diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-10-09 10:23:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-10-09 10:23:44 +0000 |
commit | e69bae37c621e77b7ac63e8bc09eef7ab639b95f (patch) | |
tree | c21b01a9864d72ac57dc0fd3b68f3abb27757cda /html/webpack.config.js | |
parent | Releasing debian version 1.6.3-4. (diff) | |
download | ttyd-e69bae37c621e77b7ac63e8bc09eef7ab639b95f.tar.xz ttyd-e69bae37c621e77b7ac63e8bc09eef7ab639b95f.zip |
Merging upstream version 1.6.3+20210924.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'html/webpack.config.js')
-rw-r--r-- | html/webpack.config.js | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/html/webpack.config.js b/html/webpack.config.js index 0285d96..593bac3 100644 --- a/html/webpack.config.js +++ b/html/webpack.config.js @@ -3,7 +3,7 @@ const { merge } = require('webpack-merge'); const CopyWebpackPlugin = require('copy-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const MiniCssExtractPlugin = require("mini-css-extract-plugin"); -const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin"); +const CssMinimizerPlugin = require('css-minimizer-webpack-plugin'); const TerserPlugin = require('terser-webpack-plugin'); const devMode = process.env.NODE_ENV !== 'production'; @@ -15,7 +15,7 @@ const baseConfig = { }, output: { path: path.resolve(__dirname, 'dist'), - filename: devMode ? '[name].js' : '[name].[hash].js', + filename: devMode ? '[name].js' : '[name].[contenthash].js', }, module: { rules: [ @@ -49,8 +49,8 @@ const baseConfig = { ], }), new MiniCssExtractPlugin({ - filename: devMode ? '[name].css' : '[name].[hash].css', - chunkFilename: devMode ? '[id].css' : '[id].[hash].css', + filename: devMode ? '[name].css' : '[name].[contenthash].css', + chunkFilename: devMode ? '[id].css' : '[id].[contenthash].css', }), new HtmlWebpackPlugin({ inject: false, @@ -86,17 +86,8 @@ const prodConfig = { mode: 'production', optimization: { minimizer: [ - new TerserPlugin({ - sourceMap: true - }), - new OptimizeCSSAssetsPlugin({ - cssProcessorOptions: { - map: { - inline: false, - annotation: true - } - } - }), + new TerserPlugin(), + new CssMinimizerPlugin(), ] }, devtool: 'source-map', |