Support IE 11#59
Conversation
|
One more thing, some of the dependencies are not IE11 compatible as well.
I am thinking of 2 approaches:
Any idea about this? |
Codecov Report
@@ Coverage Diff @@
## master #59 +/- ##
==========================================
+ Coverage 93.73% 93.79% +0.06%
==========================================
Files 85 86 +1
Lines 1675 1692 +17
==========================================
+ Hits 1570 1587 +17
Misses 105 105
Continue to review full report at Codecov.
|
|
The easiest way - extend your local babel-loader to node_modules, as CRA does. It will just fix any possible issues. |
package.json
Outdated
| "build": "npm run build5 && npm run build6 && npm run buildwebpack", | ||
| "build5": "BABEL_ENV=cjs babel src -d lib && cp src/index.js.flow lib/index.js.flow", | ||
| "build6": "BABEL_ENV=ejs babel src -d es && cp src/index.js.flow es/index.js.flow", | ||
| "buildwebpack": "BABEL_ENV=cjs babel webpack -d lib-webpack", |
There was a problem hiding this comment.
This is not quite correct way of doing it.
A bit more right way is:
- move
webpackdir tosrc - add
cp lib/webpack ./webpackasbuildwebpack
But I would propose just land a local .eslintrc with ES5 forced. It's literally a few lines of code to change.
There was a problem hiding this comment.
The issue is not only about webpack folder, but also src folder. I checked the build5 output, they do NOT have the following syntax transformed:
- arrow functions
- default value of function parameter
As a result, the whole package is not IE11 compatible - not just the several lines in webpack folder.
So just changing the code in webpack folder is not enough.
There was a problem hiding this comment.
Looks like a good idea to move webpack to src!
There was a problem hiding this comment.
changing eslint, and adding plugins to babelrc should be enought.
There was a problem hiding this comment.
I see. To make sure we are on the same page,
- for webpack folder, we do not move it, instead we add eslint rc and change the code to be compatible.
- for src folder, we add the plugins to babelrc
Do they sounds good?
|
Oups! Someone already did it! #58 |
Add babel config to support for ie 11