From 13e3aa3e451e42aefe008bc88921e3390a0c2fe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=82=A8=EC=A0=95=EC=9A=B1?= <113816822+HelloWook@users.noreply.github.com> Date: Wed, 6 Nov 2024 09:20:50 +0900 Subject: [PATCH] =?UTF-8?q?chore=20:=20=EC=9B=B9=ED=8C=A9=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webpack/webpack.prod.js | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/webpack/webpack.prod.js b/webpack/webpack.prod.js index 266081f..e3a197b 100644 --- a/webpack/webpack.prod.js +++ b/webpack/webpack.prod.js @@ -1,8 +1,26 @@ const { merge } = require('webpack-merge'); const common = require('../webpack.common.js'); const webpack = require('webpack'); +const TerserPlugin = require('terser-webpack-plugin'); module.exports = merge(common, { mode: 'production', - devtool: 'hidden-source-map' + devtool: 'hidden-source-map', + optimization: { + minimize: true, + minimizer: [ + new TerserPlugin({ + terserOptions: { + compress: { + drop_console: true + } + } + }) + ] + }, + plugins: [ + new webpack.DefinePlugin({ + 'process.env.NODE_ENV': JSON.stringify('production') + }) + ] });