Merge pull request #13900 from Snuffleupagus/rm-babel-logical-assignment

[api-minor] Stop translating logical assignment in non-`legacy` builds (PR 12887 follow-up)
This commit is contained in:
Tim van der Meij 2021-08-17 22:01:27 +02:00 committed by GitHub
commit a936509b77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -208,9 +208,6 @@ function createWebpackConfig(
}
const babelExcludeRegExp = new RegExp(`(${babelExcludes.join("|")})`);
// Since logical assignment operators is a fairly new ECMAScript feature,
// for now we translate these regardless of the `SKIP_BABEL` value (with the
// exception of `MOZCENTRAL`/`TESTING`-builds where this isn't an issue).
const babelPlugins = [
"@babel/plugin-transform-modules-commonjs",
[
@ -221,9 +218,6 @@ function createWebpackConfig(
},
],
];
if (!bundleDefines.MOZCENTRAL && !bundleDefines.TESTING) {
babelPlugins.push("@babel/plugin-proposal-logical-assignment-operators");
}
const plugins = [];
if (!disableLicenseHeader) {
@ -1416,7 +1410,6 @@ function buildLibHelper(bundleDefines, inputStream, outputDir) {
sourceType: "module",
presets: skipBabel ? undefined : ["@babel/preset-env"],
plugins: [
"@babel/plugin-proposal-logical-assignment-operators",
"@babel/plugin-transform-modules-commonjs",
[
"@babel/plugin-transform-runtime",