File tree Expand file tree Collapse file tree 1 file changed +13
-18
lines changed Expand file tree Collapse file tree 1 file changed +13
-18
lines changed Original file line number Diff line number Diff line change 1
1
var webpack = require ( 'webpack' ) ;
2
2
3
3
module . exports = {
4
- mode : ( / h o t f i x \/ | r e l e a s e \/ | m a s t e r / ) . test ( process . env . BRANCH_NAME ) ? 'production' : 'development' ,
5
- entry : { 'src/common/index.js' : './src/common/index.js' } ,
6
- optimization : {
7
- splitChunks : {
8
- cacheGroups : {
9
- vendor : {
10
- test : / n o d e _ m o d u l e s / ,
11
- chunks : 'initial' ,
12
- name : 'common' ,
13
- priority : 10 ,
14
- enforce : true
15
- }
16
- }
17
- } ,
18
- runtimeChunk : false
19
- } ,
4
+ entry : "./src/common/index.js" ,
20
5
output : {
21
6
filename : "bundle.js" ,
22
7
path : __dirname + "/dist"
@@ -49,6 +34,16 @@ module.exports = {
49
34
'process.env' : {
50
35
NODE_ENV : JSON . stringify ( 'production' )
51
36
}
52
- } )
37
+ } ) ,
38
+ new webpack . optimize . UglifyJsPlugin ( {
39
+ beautify : false ,
40
+ output : {
41
+ comments : false
42
+ } ,
43
+ compress : {
44
+ warnings : false ,
45
+ unused : true
46
+ }
47
+ } ) ,
53
48
]
54
- }
49
+ }
You can’t perform that action at this time.
0 commit comments