nystudio107 / annotated-webpack-config

This is the companion github repo for the "An Annotated webpack 4 Config for Frontend Web Development" article.
https://nystudio107.com/blog/an-annotated-webpack-4-config-for-frontend-web-development
MIT License
435 stars 75 forks source link

@babel/polyfill #8

Closed fmal closed 5 years ago

fmal commented 5 years ago

babel-preset-env is configured with useBuiltIns: 'entry' and according to the docs (https://babeljs.io/docs/en/babel-preset-env) import "@babel/polyfill" line is expected in app's entry file, but i can't find it referenced anywhere (even as part of webpack entry points) in the project. Is it enough to add @babel/polyfill to dependencies in pkg.json?

khalwat commented 5 years ago

Yes, my understanding is that the runtime takes care of bundling this. It seems to be working as expected.

lassemt commented 5 years ago

While at it. Is there a way to load a polyfill that is not included with babel only in legacy?