Drop IE 11 support by default#5090
Conversation
|
|
||
| ### Entry Points | ||
|
|
||
| There is no single entry point. You can only import individual browser support levels. |
There was a problem hiding this comment.
- "You can import the entry point for the minimal version you intend to support. For example, if you import the IE9 entry point, this will include IE10 and IE11 support."
| #### Internet Explorer 9 | ||
|
|
||
| ```js | ||
| // # index.js |
There was a problem hiding this comment.
// # index.js will be confusing.
Maybe
// This must be the first line in src/index.js
| // React 16+ relies on Map, Set, and requestAnimationFrame | ||
| require('core-js/es6/map'); | ||
| require('core-js/es6/set'); | ||
| require('raf').polyfill(global); |
| const config = { | ||
| collectCoverageFrom: ['src/**/*.{js,jsx}'], | ||
| setupFiles: [resolve('config/polyfills.js')], | ||
| setupFiles: [resolve('config/jest/polyfills.js')], |
There was a problem hiding this comment.
Why not react-app-polyfill/jsdom directly
There was a problem hiding this comment.
Good point. Though, this might be a good default for people who eject so they have a location to easily add new polyfills required for tests.
What do you think?
There was a problem hiding this comment.
And if we do switch this, does it need to be <rootDir>/node_modules/react-app-polyfill/jsdom?
There was a problem hiding this comment.
Good point. Though, this might be a good default for people who eject so they have a location to easily add new polyfills required for tests.
At this point they might as well change the config directly.
And if we do switch this, does it need to be /node_modules/react-app-polyfill/jsdom?
Check Jest docs? I would expect it to be smart enough to resolve it somehow.
gaearon
left a comment
There was a problem hiding this comment.
Would be nice to actually test that it works but good enough for beta
|
Kitchensink passed, at least. I'll test this in IE 11 on my Windows laptop. I don't think I can get access to something with IE 9, but I think IE 11 can emulate it. |
* Drop ie 11 support and move polyfills to a new package * More useful directions for what entry point to use facebook#5090 (comment) * Clear up what file this polyfill goes in facebook#5090 (comment) * Polyfill `window`, not `global` * Remove proxy polyfill file
This drops IE 11 support by default. We no longer ship or use a polyfill entrypoint.
Introduces new package,
react-app-polyfill, with entry points forie9,ie11, andjsdom.This also goes a step further and polyfills some things previously not polyfilled, i.e.:
Symbol(used byfor...of)Array.from(used by[...arr])TODO:
Array.fromis needed to perform array spread and not handled magically by babel somehow