diff --git a/swh/web/assets/config/webpack.config.production.js b/swh/web/assets/config/webpack.config.production.js index 1993c8d1..f8dc76de 100644 --- a/swh/web/assets/config/webpack.config.production.js +++ b/swh/web/assets/config/webpack.config.production.js @@ -1,45 +1,46 @@ /** * Copyright (C) 2018-2019 The Software Heritage developers * See the AUTHORS file at the top-level directory of this distribution * License: GNU Affero General Public License version 3, or any later version * See top-level LICENSE file for more information */ // webpack configuration for compiling static assets in production mode // import required webpack plugins const TerserPlugin = require('terser-webpack-plugin'); const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin'); // import webpack development configuration var webpackProdConfig = require('./webpack.config.development'); // override mode to production webpackProdConfig.mode = 'production'; // configure minimizer for js and css assets webpackProdConfig.optimization.minimizer = [ // use terser for minimizing js and generate source map files new TerserPlugin({ cache: true, parallel: true, sourceMap: true }), // use cssnano for minimizing css and generate source map files new OptimizeCSSAssetsPlugin({ cssProcessorOptions: { map: { - inline: false + inline: false, + annotation: true }, minifyFontValues: false, discardUnused: false, zindex: false } }) ]; // prevent modules concatenation for generating weblabels webpackProdConfig.optimization.concatenateModules = false; // webpack production configuration module.exports = webpackProdConfig;