File tree Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Original file line number Diff line number Diff line change 12
12
"license" : " MIT" ,
13
13
"dependencies" : {
14
14
"babel-core" : " 6.23.1" ,
15
- "babel-loader" : " 6.3.2 " ,
16
- "babel-preset-env" : " 1.1.11 " ,
15
+ "babel-loader" : " 6.4.0 " ,
16
+ "babel-preset-env" : " 1.2.1 " ,
17
17
"babel-preset-react" : " 6.23.0" ,
18
18
"clean-webpack-plugin" : " 0.1.15" ,
19
- "css-loader" : " 0.26 .2" ,
20
- "eslint" : " 3.16 .1" ,
19
+ "css-loader" : " 0.27 .2" ,
20
+ "eslint" : " 3.17 .1" ,
21
21
"eslint-loader" : " 1.6.3" ,
22
22
"eslint-plugin-react" : " 6.10.0" ,
23
- "extract-text-webpack-plugin" : " 2.0 .0" ,
23
+ "extract-text-webpack-plugin" : " 2.1 .0" ,
24
24
"file-loader" : " 0.10.1" ,
25
25
"html-webpack-plugin" : " 2.28.0" ,
26
26
"node-sass" : " 4.5.0" ,
27
27
"react" : " 15.4.2" ,
28
28
"react-dom" : " 15.4.2" ,
29
- "sass-loader" : " 6.0.2 " ,
29
+ "sass-loader" : " 6.0.3 " ,
30
30
"style-loader" : " 0.13.2" ,
31
31
"webpack" : " 2.2.1"
32
32
},
33
33
"devDependencies" : {
34
34
"webpack-dev-server" : " 2.4.1"
35
+ },
36
+ "engines" : {
37
+ "node" : " >=7.5.0"
35
38
}
36
39
}
Original file line number Diff line number Diff line change @@ -28,14 +28,18 @@ var plugins = [
28
28
29
29
module . exports = function ( env ) {
30
30
if ( env && env . dist ) {
31
+ // https://webpack.js.org/guides/production-build/
31
32
var webpack = require ( 'webpack' ) ;
32
33
33
- var uglifyJsPlugin = new webpack . optimize . UglifyJsPlugin ( {
34
+ plugins . push ( new webpack . optimize . UglifyJsPlugin ( {
35
+ beautify : false ,
34
36
mangle : true ,
35
37
comments : false
36
- } ) ;
38
+ } ) ) ;
37
39
38
- plugins . push ( uglifyJsPlugin ) ;
40
+ plugins . push ( new webpack . DefinePlugin ( {
41
+ 'process.env.NODE_ENV' : JSON . stringify ( 'production' )
42
+ } ) ) ;
39
43
}
40
44
41
45
return {
You can’t perform that action at this time.
0 commit comments