-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
for #950, update babel to v7 #1077
Conversation
"transform-react-inline-elements" | ||
"@babel/plugin-transform-react-constant-elements", | ||
"@babel/plugin-transform-react-inline-elements", | ||
"@babel/plugin-syntax-dynamic-import", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The @babel/plugin-syntax-dynamic-import
documentation says:
Currently, @babel/preset-env is unaware that using import() with Webpack relies on Promise internally. Environments which do not have builtin support for Promise, like Internet Explorer, will require both the promise and iterator polyfills be added manually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this mostly affects IE support. to get this to work, does core-js
need to be added as a dependency? i fell into a hole reading about @babel/preset-env
with useBuiltIns: "usage"
, but can't figure out whether using this feature affects this plugin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think setting useBuiltIns
to anything other than false
will insert core-js
imports for the required polyfills.
core-js
seems to already be included in node_modules
because of the following dependencies:
@babel/preset-env
core-js-compat
core-js
So this should just work as-is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, i just pushed a change to the webpack configs to support this.
Wow, thanks for tackling this! I've added some comments above based on each plugin's documentation. I've also done some manual testing and things seem to work find so perhaps the plugin comments above aren't relevant? Manual test planWhat I did:
I performed the following manual actions
Browsers:
Shall I also test in Microsoft Edge? What versions does the Editor support? |
…pendencies) and change babel-loader config to use .babelrc
There have been some issues with Edge that I've never been able to figure out/fix (see #27), but as far as I know, Edge should be supported. I have a free BrowserStack plan because this project is open source, should I invite you? |
@catarak Yes please! |
…th babel/plugin-syntax-dynamic-import
when i ran the command |
I think if we're going to all the effort of testing the changes, it's worth upgrading to the latest released version. 🚀 |
cool, i'm going to upgrade everything to LTS |
I just tested the LTS babel in Microsoft Edge 44.17763.1.0 and it's looking good to me! |
okay great. i'm going to merge this! |
* for #950, upgrade babel to v7 * fix linting errors * for #950, remove @babel/core from devDependencies (so it's only in dependencies) and change babel-loader config to use .babelrc * for #950, changes to .babelrc to make work * for #950, include core-js modules in webpack config for IE support with babel/plugin-syntax-dynamic-import * for #950, update babel and associated packages to LTS
* for #950, upgrade babel to v7 * fix linting errors * for #950, remove @babel/core from devDependencies (so it's only in dependencies) and change babel-loader config to use .babelrc * for #950, changes to .babelrc to make work * for #950, include core-js modules in webpack config for IE support with babel/plugin-syntax-dynamic-import * for #950, update babel and associated packages to LTS
I have verified that this pull request:
npm run lint
)Fixes #123
I upgraded babel to v7, but since I changed a lot of core things I think this needs a review!