Skip to content
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

fix: should not add polyfills from transform-runtime plugin #3730

Merged
merged 1 commit into from
Mar 31, 2019

Conversation

haoqunjiang
Copy link
Member

It is due to a misunderstanding when upgrading babel from 7.0.0-beta.47
to 7.x.
In Vue CLI, usage-based polyfills are only added by @babel/preset-env
so that it avoids overheads. transform-runtime plugin adds polyfills
regardless of env targets so we must disable its polyfill feature.
Though, there're edge cases where runtime-helpers' polyfill dependency
are not correctly added (babel/babel#7597),
so we also need to whitelist @babel/runtime for webpack to transpile.

Verified

This commit was signed with the committer’s verified signature.
joshka Josh McKinney
It is due to a misunderstanding when upgrading babel from 7.0.0-beta.47
to 7.x.
In Vue CLI, usage-based polyfills are **only** added by @babel/preset-env
so that it avoids overheads. `transform-runtime` plugin adds polyfills
regardless of env targets so we must disable its polyfill feature.
Though, there're edge cases where runtime-helpers' polyfill dependency
are not correctly added (babel/babel#7597),
so we also need to whitelist `@babel/runtime` for webpack to transpile.
@haoqunjiang haoqunjiang merged commit b987969 into vuejs:dev Mar 31, 2019
haoqunjiang added a commit to haoqunjiang/vue-cli that referenced this pull request Apr 1, 2019

Verified

This commit was signed with the committer’s verified signature.
…uejs#3730)"

This reverts commit b987969.
haoqunjiang added a commit that referenced this pull request Apr 1, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…3730)" (#3742)

This reverts commit b987969.

closes #3741
haoqunjiang added a commit to haoqunjiang/vue-cli that referenced this pull request Apr 27, 2019

Verified

This commit was signed with the committer’s verified signature.
joshka Josh McKinney
…e plugin (vuejs#3730)""

This reverts commit 8c7e52d.
haoqunjiang added a commit that referenced this pull request Apr 28, 2019

Verified

This commit was signed with the committer’s verified signature.
joshka Josh McKinney
The basic idea is the same as #3730, except that this time we use babel-plugin-module-resolve for aliasing instead of relying on webpack.
@aasailan
Copy link

i use vuecli 3.9.2 but the project add polyfills from transform-runtime plugin。what can i do?
2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants