-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
Labels
outdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue
Description
Feature Request
Is your feature request related to a problem? Please describe.
Basically we are trying to resolve this issue in @vue/babel-preset-app:
#6628
How can we write ES20xx and ship the smallest amount of code (for a given target environment)?
To be more specific, this item:
- babel helpers: reference the same helpers instead of recreating per file (either via /packages/babel-plugin-transform-runtime@
7.0#options
- To achieve that we need to combine
@babel/preset-envwith@babel/transform-runtime, and the latter one is only used to do helper transformation. - The default runtime has a blocking issue though, see 'Symbol' is undefined problem in ie11 #7597
- So to circumvent it we have to use
@babel/runtime-corejs2. I know it's not the best solution but it's an acceptable compromise/tradeoff in practice. - Before beta.56 we were able to disable
polyfillsoption while still referring the helper functions to@babel/runtime-corejs2. - But after this commit,
polyfillsoption is removed because it is now the default behavior. - An unintended consequence is that we can no longer point
helpersto any other runtime package without introducing core-js polyfills along with it.
Describe the solution you'd like
Bring back the polyfills option, allowing the user to opt-out it while still being able to specify a core-js version for helpers.
Describe alternatives you've considered
N/A
Teachability, Documentation, Adoption, Migration Strategy
N/A
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
outdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue