summaryrefslogtreecommitdiff
path: root/node_modules/@babel/preset-env/lib/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/@babel/preset-env/lib/index.js')
-rw-r--r--node_modules/@babel/preset-env/lib/index.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/node_modules/@babel/preset-env/lib/index.js b/node_modules/@babel/preset-env/lib/index.js
index b1142d2c..4336e073 100644
--- a/node_modules/@babel/preset-env/lib/index.js
+++ b/node_modules/@babel/preset-env/lib/index.js
@@ -70,7 +70,7 @@ const transformIncludesAndExcludes = opts => {
});
};
exports.transformIncludesAndExcludes = transformIncludesAndExcludes;
-function getSpecialModulesPluginNames(modules, shouldTransformDynamicImport) {
+function getSpecialModulesPluginNames(modules, shouldTransformDynamicImport, babelVersion) {
const modulesPluginNames = [];
if (modules) {
modulesPluginNames.push(_moduleTransformations.default[modules]);
@@ -82,7 +82,7 @@ function getSpecialModulesPluginNames(modules, shouldTransformDynamicImport) {
console.warn("Dynamic import can only be transformed when transforming ES" + " modules to AMD, CommonJS or SystemJS.");
}
}
- {
+ if (babelVersion[0] !== "8") {
if (!shouldTransformDynamicImport) {
modulesPluginNames.push("syntax-dynamic-import");
}
@@ -253,7 +253,7 @@ option \`forceAllTransforms: true\` instead.
if (!exclude.plugins.has("transform-export-namespace-from") && (optionsModules === "auto" ? !api.caller(supportsExportNamespaceFrom) : !!modules)) {
include.plugins.add("transform-export-namespace-from");
}
- const pluginNames = (0, _helperCompilationTargets.filterItems)(compatData, include.plugins, exclude.plugins, transformTargets, getSpecialModulesPluginNames(modules, shouldTransformDynamicImport), !loose ? undefined : ["transform-typeof-symbol"], _shippedProposals.pluginSyntaxMap);
+ const pluginNames = (0, _helperCompilationTargets.filterItems)(compatData, include.plugins, exclude.plugins, transformTargets, getSpecialModulesPluginNames(modules, shouldTransformDynamicImport, api.version), !loose ? undefined : ["transform-typeof-symbol"], _shippedProposals.pluginSyntaxMap);
if (shippedProposals) {
(0, _filterItems.addProposalSyntaxPlugins)(pluginNames, _shippedProposals.proposalSyntaxPlugins);
}