From 8d68ffe952adef6b160a36f7f1c4045378dad282 Mon Sep 17 00:00:00 2001 From: moshangqi <2509678669@qq.com> Date: Fri, 4 Aug 2023 19:35:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8E=BB=E9=99=A4=E6=89=93=E5=8C=85?= =?UTF-8?q?=E4=BA=A7=E7=89=A9=E7=9A=84=20license=20=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + webpack.config.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/package.json b/package.json index 57e7f0f6..a3da529a 100644 --- a/package.json +++ b/package.json @@ -98,6 +98,7 @@ "svg-sprite-loader": "^4.1.6", "svgo": "^1.3.2", "svgo-loader": "^2.2.1", + "terser-webpack-plugin": "^5.3.9", "ts-loader": "^8.4.0", "typescript": "^4.9.5", "url-loader": "^4.1.1", diff --git a/webpack.config.js b/webpack.config.js index a072d8d8..d3a200b3 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -7,6 +7,7 @@ const moment = require('moment'); const { CleanWebpackPlugin } = require('clean-webpack-plugin'); const CopyWebpackPlugin = require('copy-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin'); +const TerserPlugin = require('terser-webpack-plugin'); const { presetEditor, @@ -223,6 +224,7 @@ const options = { optimization: { minimize: isProd, nodeEnv: NODE_ENV, + minimizer: [ new TerserPlugin() ], }, };