-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.prod.js
More file actions
30 lines (28 loc) · 842 Bytes
/
Copy pathwebpack.prod.js
File metadata and controls
30 lines (28 loc) · 842 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
26
27
28
29
30
const { merge:webpackMerge } = require('webpack-merge')
const common = require('./webpack.common')
const path = require('path')
const TerserPlugin = require('terser-webpack-plugin');
module.exports = webpackMerge(common(), {
mode:'production',
output:{
path:path.join(path.resolve(__dirname),"public"),
filename:'[name].[contenthash].bundle.js',
clean:true,
chunkFilename:'[contenthash].js'
},
optimization:{
minimize:true,
minimizer:[new TerserPlugin({
test:/\.js$/,
//exclude:'/node-modules/',
parallel:true,
minify:TerserPlugin.terserMinify
})],
},
resolve: {
alias: {
'react-dom$': 'react-dom/profiling',
'scheduler/tracing': 'scheduler/tracing-profiling'
}
}
})