-
Notifications
You must be signed in to change notification settings - Fork 903
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
Update all Babel package versions. #1344
Conversation
@@ -16,6 +16,7 @@ export default { | |||
output: { | |||
path: resolve(__dirname, "dist"), | |||
publicPath: "/", | |||
libraryExport: "default", |
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.
positive affirmation:
- Gosh, i struggled SO long trying to figure out how to get the default export to work. Webpack can be so insane that tracking down these options is a challenge. Thanks for this!
@@ -24,7 +24,7 @@ module.exports = config => { | |||
// use different import syntaxes so it's not easy to just require it here. | |||
// Maybe this could be put into a JSON file, but the include in the module | |||
// rules is dynamic. | |||
entry: ["babel-polyfill", "./src/index.js"], | |||
entry: ["@babel/polyfill", "./src/index.js"], |
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.
Question:
- Do we still need the polyfill here? Looking at the babel docs it looks like we can specify
entry
on theuseBuiltIns
option forpreset-env
? https://babeljs.io/docs/en/babel-polyfill/#usage-in-node--browserify--webpack
I don't want to send us on a wild goose chase so if this is working, then Im totes happy to keep it! I got lost in trying to fix this and it seemed like a lot of heartache for not a big difference in code change.
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.
Good idea. Definitely seems like that should work!
🤔 hiii I'm trying to run this locally and seeing the following:
I deleted my node_modules and tried to reinstall but no dice. Update: whoops! looked like I had some zombie files! It's totally working! |
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.
LGTM! I've tested this locally and can confirm that this is working as expected.
Thanks so much for teaching me something new and for doing this critical infrastructure support work. It really helps move us towards modernizing our dev setup and tooling! 🥇
babel-
v6 packages with v7@babel/
packages.babel-loader
from v7 to v8."babel-polyfill"
to"@babel/polyfill"
in webpack config and karma config.module.exports =
insrc/index.js
toexport default
, asmodule.exports
cannot be used in files withimport
syntax.libraryExport: "default"
to the webpack config, which is needed due to the previous change.