-
Notifications
You must be signed in to change notification settings - Fork 15
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
Some questions about integrating with HtmlWebpackPlugin babel-env and browserslist. #13
Comments
Additionally, our entry point looks like this, as a dependency needs map and set to be polyfilled for IE11.
|
Hiya - you need to move the babel configuration into a babelrc or babel.config.js, and to remove babel-loader. OptimizePlugin uses your babel config for the modern bundles only. The legacy bundles are compiled to ES5 without looking at custom configuration, but their syntax level will be based on your browserslist. You should remove the custom configuration for Set and Map. Both those API's are supported in IE11, and any additional usage will get automatically polyfilled in your legacy bundles. The premise of this plugin is essentially that you don't need to ever manually configure transpilation or polyfilling - it's all done automatically based on usage. |
I also wanted to open an issue about documentation and that I couldn't make it to optimize our application even further. Is there a demo that we can play with and see the configs and compare results? |
Thanks, I will give this a shot this week and report any issues here. |
Added this to the FAQ. |
It's more of a query than an issue, but your README doesn't contain the documentation for this, and I have some questions about integration with an existing codebase, having seen your plugin on https://estimator.dev/:
.babelrc
presets and plugin file have to be separated out instead of passing it as an integrated config option (our current codebase passes that in through config)? So you know what I mean, this is our current babel config - we use something that's a little complex in terms of plugins and presets, thanks to some react components.browswerslist
in ourpackage.json
for babel-env to chew on. If we defined such a list in the.babelrc
, would it have an effect and would it affect themodule
ornomodule
bundle?The text was updated successfully, but these errors were encountered: