From 6450629d707927dff98a22f07cdcd4e1adf4a79f Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 5 Sep 2021 18:20:39 +0900 Subject: [PATCH] =?UTF-8?q?CssMinimizer=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + webpack.config.cjs | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index fcf89475..bd799d71 100644 --- a/package.json +++ b/package.json @@ -59,6 +59,7 @@ "bootswatch": "^5.1.0", "clean-terminal-webpack-plugin": "^3.0.0", "css-loader": "^6.2.0", + "css-minimizer-webpack-plugin": "^3.0.2", "eslint": "^7.32.0", "file-loader": "^6.2.0", "mini-css-extract-plugin": "^2.2.2", diff --git a/webpack.config.cjs b/webpack.config.cjs index 748086fb..003a8d5a 100644 --- a/webpack.config.cjs +++ b/webpack.config.cjs @@ -1,6 +1,7 @@ const path = require('path'); const { VueLoaderPlugin } = require('vue-loader'); const MiniCssExtractPlugin = require('mini-css-extract-plugin') +const CssMinimizerPlugin = require('css-minimizer-webpack-plugin'); const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; const { resolve } = require('path'); const CleanTerminalPlugin = require('clean-terminal-webpack-plugin'); @@ -46,7 +47,10 @@ module.exports = (env, argv) => { reuseExistingChunk: true, }, }, - } + }, + minimizer: [ + new CssMinimizerPlugin(), + ], }, module: { rules: [ @@ -210,7 +214,10 @@ module.exports = (env, argv) => { chunks: 'all', }, }, - } + }, + minimizer: [ + new CssMinimizerPlugin(), + ], }, module: { rules: [{ @@ -277,7 +284,10 @@ module.exports = (env, argv) => { chunks: 'all', }, }, - } + }, + minimizer: [ + new CssMinimizerPlugin(), + ], }, module: { rules: [{