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:
		
						commit
						a936509b77
					
				@ -208,9 +208,6 @@ function createWebpackConfig(
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
  const babelExcludeRegExp = new RegExp(`(${babelExcludes.join("|")})`);
 | 
					  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 = [
 | 
					  const babelPlugins = [
 | 
				
			||||||
    "@babel/plugin-transform-modules-commonjs",
 | 
					    "@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 = [];
 | 
					  const plugins = [];
 | 
				
			||||||
  if (!disableLicenseHeader) {
 | 
					  if (!disableLicenseHeader) {
 | 
				
			||||||
@ -1416,7 +1410,6 @@ function buildLibHelper(bundleDefines, inputStream, outputDir) {
 | 
				
			|||||||
      sourceType: "module",
 | 
					      sourceType: "module",
 | 
				
			||||||
      presets: skipBabel ? undefined : ["@babel/preset-env"],
 | 
					      presets: skipBabel ? undefined : ["@babel/preset-env"],
 | 
				
			||||||
      plugins: [
 | 
					      plugins: [
 | 
				
			||||||
        "@babel/plugin-proposal-logical-assignment-operators",
 | 
					 | 
				
			||||||
        "@babel/plugin-transform-modules-commonjs",
 | 
					        "@babel/plugin-transform-modules-commonjs",
 | 
				
			||||||
        [
 | 
					        [
 | 
				
			||||||
          "@babel/plugin-transform-runtime",
 | 
					          "@babel/plugin-transform-runtime",
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user