Skip to content

Commit

Permalink
chore : 웹팩 설정 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
HelloWook committed Nov 6, 2024
1 parent d24cfef commit 13e3aa3
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion webpack/webpack.prod.js
Original file line number Diff line number Diff line change
@@ -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')
})
]
});

0 comments on commit 13e3aa3

Please sign in to comment.