-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
transform-runtime plugin option ignored for "polyfill":false #5382
Comments
Hey @sudo-suhas! We really appreciate you taking the time to report an issue. The collaborators If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack |
Great 😄 If you don't mind, could you also tell me by when 7.0 might be released? |
No schedule, we will be releasing alpha/rc versions over time though, probably another one with that PR this week. |
@hzoo I think we need to reopen this issue. I tried the steps with the latest beta for babel packages but the issue still persists.
{
"presets": [
["@babel/preset-env", {
"modules": false,
"useBuiltIns": false, // I also tried it with `"usage"`
"debug": true
}],
"@babel/preset-stage-2"
],
"plugins": [["@babel/plugin-transform-runtime", { "polyfill": false }]],
"env": {
"test": {
"presets": ["@babel/preset-env", "@babel/preset-stage-2"],
"plugins": ["@babel/plugin-transform-modules-commonjs", "dynamic-import-node"]
}
}
}
{
// ...
"devDependencies": {
"@babel/core": "^7.0.0-beta.32",
"@babel/plugin-transform-modules-commonjs": "^v7.0.0-beta.32",
"@babel/plugin-transform-runtime": "^7.0.0-beta.32",
"@babel/preset-env": "^v7.0.0-beta.32",
"@babel/preset-stage-2": "^7.0.0-beta.32",
"@babel/register": "^7.0.0-beta.32",
"@babel/runtime": "^7.0.0-beta.32",
"babel-loader": "^8.0.0-beta.0",
"babel-plugin-dynamic-import-node": "^1.2.0",
// ...
}
} Build output:
|
transform-runtime
plugin usage option for disabling polyfills is ignored when used to transpile code with async functions.Input Code
I am able to reproduce the bug using the vue webpack template starter pack.
To create a fresh project:
Modify
.babelrc
to have["transform-runtime", { "polyfill": false }]
.Add the following to
src/main.js
:Babel Configuration (.babelrc, cli command)
Expected Behavior
Since polyfill option is disabled, core-js modules should not be exported.
Current Behavior
The polyfills are added despite the
.babelrc
configContext
I am tying to export my choice of polyfill of promise library but the build ends up exporting both the polyfill library as well as the core-js promise version.
Your Environment
The text was updated successfully, but these errors were encountered: