You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The @vue/app preset will always bundle any needed polyfills. An alternative to including polyfills via Babel is the polyfill.io service, which will only serve polyfills if the browser actually needs them, thus vastly reducing total bundle size for most visitors.
For users that want to use this service, could we provide an option to disable polyfills through babel-preset-env?
What does the proposed API look like?
I see a few solutions:
A: Simply document how to solve the problem in .babelrc if that's feasible without potentially breaking with the @vue/app preset.
B: Create a new preset called something like @vue/app-no-polyfills.
C: Provide an option in vue.config.js to disable polyfills.
I don't have a strong preference on which of those strategies is used.
The text was updated successfully, but these errors were encountered:
It would also be possible to overwrite the preset-env settings in .babelrc, but explaining that would take more characters than adding the option I think :D
This way, the option basically explains itself and users don't have to know about the implementation detail of useBuiltIns. And, we also retain the freedom to change how we bundle polyfills in the future without it being a breaking change for users. What do you think?
What problem does this feature solve?
The
@vue/app
preset will always bundle any needed polyfills. An alternative to including polyfills via Babel is the polyfill.io service, which will only serve polyfills if the browser actually needs them, thus vastly reducing total bundle size for most visitors.For users that want to use this service, could we provide an option to disable polyfills through babel-preset-env?
What does the proposed API look like?
I see a few solutions:
.babelrc
if that's feasible without potentially breaking with the@vue/app
preset.@vue/app-no-polyfills
.vue.config.js
to disable polyfills.I don't have a strong preference on which of those strategies is used.
The text was updated successfully, but these errors were encountered: