1 |
|
2 |
|
3 | if (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.
|
10 | Object.assign = require('object-assign')
|
11 |
|
12 | // Support for...of (a commonly used syntax feature that requires Symbols)
|
13 | require('core-js/es/symbol')
|
14 | // Support iterable spread (...Set, ...Map)
|
15 | require('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.
|
19 | if (process.env.NODE_ENV === 'test') {
|
20 | require('raf').polyfill(global)
|
21 | }
|