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

chore: do not provide polyfills on bundling @babel/standalone #12909

Merged
merged 3 commits into from Feb 26, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 10 additions & 2 deletions babel.config.js
Expand Up @@ -76,7 +76,15 @@ module.exports = function (api) {
case "standalone":
includeRegeneratorRuntime = true;
unambiguousSources.push("packages/babel-runtime/regenerator");
// fall through
convertESM = false;
ignoreLib = false;
// rollup-commonjs will converts node_modules to ESM
unambiguousSources.push(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: we can merge the unambiguousSources.push calls.

"/**/node_modules",
"packages/babel-preset-env/data",
"packages/babel-compat-data"
);
break;
case "rollup":
convertESM = false;
ignoreLib = false;
Expand All @@ -86,7 +94,7 @@ module.exports = function (api) {
"packages/babel-preset-env/data",
"packages/babel-compat-data"
);
if (env === "rollup") targets = { node: nodeVersion };
targets = { node: nodeVersion };
needsPolyfillsForOldNode = true;
break;
case "test-legacy": // In test-legacy environment, we build babel on latest node but test on minimum supported legacy versions
Expand Down