message: package: include embeds.js only when needed + dont minify on FF
diff: @@ -37,12 +37,7 @@ const staticFiles = [
  {
  from: '_locales/**/*',
  },
  - {
  - from: '../tools/embeds.js',
  - },
  -].map(i => (Object.assign(i, {
  - context: './src/',
  -})));
  +];
  const DIST_FOLDER = 'dist';
  const IS_PRODUCTION = process.env.NODE_ENV !== 'dev';
  @@ -72,6 +67,17 @@ module.exports = (env) => {
  Possible values: chrome, firefox`);
  }
  + if (env.browser !== 'firefox') {
  + staticFiles.push({
  + from: '../tools/embeds.js',
  + });
  + }
  +
  + const staticFilesPath = staticFiles.map(i => (Object.assign(i, {
  + context: './src/',
  + })));
  +
  +
  const getManifest = () => require(`./tools/manifests/${env.browser}.js`);
  fs.writeFileSync(path.resolve(__dirname, 'config/config.json'), JSON.stringify(config));
  @@ -117,9 +123,9 @@ module.exports = (env) => {
  extractContent,
  extractOptions,
  new CleanWebpackPlugin([DIST_FOLDER]),
  - new CopyWebpackPlugin(staticFiles),
  + new CopyWebpackPlugin(staticFilesPath),
  new GenerateJsonPlugin('manifest.json', getManifest(), null, 2),
  - IS_PRODUCTION ? new UglifyJSPlugin({
  + IS_PRODUCTION && env.browser !== 'firefox' ? new UglifyJSPlugin({
  parallel: true,
  }) : () => null,
  IS_PRODUCTION ? new ZipPlugin({
  