This is very confusing as seen in #12974 or #12906. My suggestion would be "legacy."
[
      "@babel/plugin-transform-runtime",
      {
        helpers: false,
        regenerator: true,
      },
    ],
  ];
  if (!bundleDefines.MOZCENTRAL && !bundleDefines.TESTING) {
    babelPlugins.push("@babel/plugin-proposal-logical-assignment-operators");
  }
  const plugins = [];
  if (!disableLicenseHeader) {
    plugins.push(
      new webpack2.BannerPlugin({ banner: licenseHeaderLibre, raw: true })
    );
  }
  
  output.globalObject = "this";
  return {
    mode: "none",
    output,
    performance: {
      hints: false, 
    },
    plugins,
    resolve: {
      alias: {
        pdfjs: path.join(__dirname, "src"),
        "pdfjs-web": path.join(__dirname, "web"),