Closed
Description
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:
- 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.