File tree Expand file tree Collapse file tree 3 files changed +2075
-320
lines changed Expand file tree Collapse file tree 3 files changed +2075
-320
lines changed Original file line number Diff line number Diff line change 26
26
"mocha" : " 5.0.5" ,
27
27
"snap-shot" : " 2.17.0" ,
28
28
"uglifyjs-webpack-plugin" : " 1.2.4" ,
29
- "webpack" : " 3.8.1"
29
+ "webpack" : " 4.4.1" ,
30
+ "webpack-cli" : " 2.0.13"
30
31
}
31
32
}
Original file line number Diff line number Diff line change 1
1
const UglifyJSPlugin = require ( "uglifyjs-webpack-plugin" ) ;
2
2
let filename ;
3
3
let plugins = [ ] ;
4
+ let mode ;
4
5
5
6
if ( process . env . NODE_ENV === "production" ) {
7
+ mode = "production" ;
6
8
filename = "sparkline.min.js" ;
7
9
plugins . push ( new UglifyJSPlugin ( { sourceMap : true } ) ) ;
8
10
} else {
11
+ mode = "development" ;
9
12
filename = "sparkline.js" ;
10
13
}
11
14
12
15
module . exports = {
13
16
entry : `${ __dirname } /src/sparkline.js` ,
14
17
devtool : "source-map" ,
15
18
target : "web" ,
19
+ mode : mode ,
16
20
node : {
17
21
fs : "empty"
18
22
} ,
You can’t perform that action at this time.
0 commit comments