From a8b044bd4d3aac6893af7bb7e3f574be0bb9eaa8 Mon Sep 17 00:00:00 2001 From: pypy Date: Fri, 7 May 2021 21:12:15 +0900 Subject: [PATCH] apply TerserPlugin --- html/webpack.config.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/html/webpack.config.js b/html/webpack.config.js index d43e2d53..27ff1dc2 100644 --- a/html/webpack.config.js +++ b/html/webpack.config.js @@ -2,6 +2,7 @@ const path = require('path'); const CopyPlugin = require('copy-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); +const TerserPlugin = require('terser-webpack-plugin'); module.exports = { entry: { @@ -122,5 +123,12 @@ module.exports = { // } ] }) - ] + ], + optimization: { + minimizer: [ + new TerserPlugin({ + extractComments: false + }) + ] + } };