UNPKG

737 BJavaScriptView Raw
1'use strict'
2
3if (typeof Promise === 'undefined') {
4 require('promise/lib/rejection-tracking').enable()
5 window.Promise = require('promise/lib/es6-extensions')
6}
7
8// Object.assign() is commonly used with React.
9// It will use the native implementation if it's present and isn't buggy.
10Object.assign = require('object-assign')
11
12// Support for...of (a commonly used syntax feature that requires Symbols)
13require('core-js/es/symbol')
14// Support iterable spread (...Set, ...Map)
15require('core-js/es/array/from')
16
17// In tests, polyfill requestAnimationFrame since jsdom doesn't provide it yet.
18// We don't polyfill it in the browser--this is user's responsibility.
19if (process.env.NODE_ENV === 'test') {
20 require('raf').polyfill(global)
21}