-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathwebpack.prod.js
More file actions
25 lines (24 loc) · 855 Bytes
/
webpack.prod.js
File metadata and controls
25 lines (24 loc) · 855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
const TerserJSPlugin = require('terser-webpack-plugin');
const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
const { merge} = require('webpack-merge');
const common = require('./webpack.common.js');
module.exports = merge(common, {
mode: 'production',
devtool: 'source-map',
optimization: {
minimize: true,
minimizer: [
new TerserJSPlugin({
parallel: true,
terserOptions: {
compress: {inline: false},
sourceMap: {
file: '[name].map'
},
mangle: { reserved: ['Lock','SuperTokensLock','GET_TOKEN_SILENTLY_LOCK_KEY'] }
}
}),
new CssMinimizerPlugin(),
],
}
});