File tree Expand file tree Collapse file tree 4 files changed +11
-11
lines changed Expand file tree Collapse file tree 4 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 125
125
"@types/rimraf" : " 0.0.28" ,
126
126
"@types/semver" : " ^5.3.30" ,
127
127
"@types/source-map" : " ^0.5.0" ,
128
- "@types/webpack" : " ^2.2.4 " ,
128
+ "@types/webpack" : " ^2.2.15 " ,
129
129
"chai" : " ^3.5.0" ,
130
130
"conventional-changelog" : " ^1.1.0" ,
131
131
"dtsgenerator" : " ^0.9.1" ,
Original file line number Diff line number Diff line change @@ -82,8 +82,8 @@ export const getProdConfig = function (wco: WebpackConfigOptions) {
82
82
return {
83
83
entry : entryPoints ,
84
84
plugins : [
85
- new webpack . DefinePlugin ( {
86
- 'process.env. NODE_ENV' : JSON . stringify ( 'production' )
85
+ new webpack . EnvironmentPlugin ( {
86
+ 'NODE_ENV' : 'production'
87
87
} ) ,
88
88
new ( < any > webpack ) . HashedModuleIdsPlugin ( ) ,
89
89
new webpack . optimize . UglifyJsPlugin ( < any > {
Original file line number Diff line number Diff line change @@ -126,8 +126,8 @@ class JsonWebpackSerializer {
126
126
} ) ;
127
127
}
128
128
129
- _definePlugin ( plugin : any ) {
130
- return plugin . definitions ;
129
+ _environmentPlugin ( plugin : any ) {
130
+ return plugin . defaultValues ;
131
131
}
132
132
133
133
private _pluginsReplacer ( plugins : any [ ] ) {
@@ -172,9 +172,9 @@ class JsonWebpackSerializer {
172
172
args = this . _htmlWebpackPlugin ( plugin ) ;
173
173
this . variableImports [ 'html-webpack-plugin' ] = 'HtmlWebpackPlugin' ;
174
174
break ;
175
- case webpack . DefinePlugin :
176
- args = this . _definePlugin ( plugin ) ;
177
- this . _addImport ( 'webpack' , 'DefinePlugin ' ) ;
175
+ case webpack . EnvironmentPlugin :
176
+ args = this . _environmentPlugin ( plugin ) ;
177
+ this . _addImport ( 'webpack' , 'EnvironmentPlugin ' ) ;
178
178
break ;
179
179
180
180
default :
Original file line number Diff line number Diff line change 138
138
dependencies :
139
139
" @types/source-map" " *"
140
140
141
- " @types/webpack@^2.2.4 " :
142
- version "2.2.12 "
143
- resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-2.2.12 .tgz#5e2ab82b5b43cfadcb308d3210c082cf67fd9893 "
141
+ " @types/webpack@^2.2.15 " :
142
+ version "2.2.15 "
143
+ resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-2.2.15 .tgz#4ad7e9b7a51cae736a1dc783f203610c884789ff "
144
144
dependencies :
145
145
" @types/node" " *"
146
146
" @types/tapable" " *"
You can’t perform that action at this time.
0 commit comments