Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
My default polyfills file for React/Redux project
// Object.assign() is commonly used with React.
Object.assign = require('object-assign');
// requestAnimationFrame polyfill
require('raf/polyfill');
// console.* polyfill for old browsers
require('console-polyfill');
// smooth scroll support for scrollIntoView
require('smoothscroll-polyfill').polyfill();
// SVG sprites support for Internet Expolorer
require('svg4everybody')();
// ES2015+ polyfill
require('core-js/fn/array/from');
require('core-js/fn/map');
require('core-js/fn/set');
require('core-js/fn/promise');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment