File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -243,20 +243,15 @@ class ConfigGenerator {
243
243
* * https://github.com/webpack/webpack.js.org/issues/652#issuecomment-273324529
244
244
* * https://webpack.js.org/guides/caching/#deterministic-hashes
245
245
*/
246
- let moduleNamePlugin ;
247
246
if ( this . webpackConfig . isProduction ( ) ) {
248
247
// shorter, and obfuscated module ids (versus NamedModulesPlugin)
249
248
// makes the final assets *slightly* larger, but prevents contents
250
249
// from sometimes changing when nothing really changed
251
- moduleNamePlugin = new webpack . HashedModuleIdsPlugin ( ) ;
250
+ plugins . push ( new webpack . HashedModuleIdsPlugin ( ) ) ;
252
251
} else {
253
252
// human-readable module names, helps debug in HMR
254
- // enable always when ! production for consistency
255
- moduleNamePlugin = new webpack . NamedModulesPlugin ( ) ;
256
- }
257
-
258
- if ( moduleNamePlugin ) {
259
- plugins . push ( moduleNamePlugin ) ;
253
+ // enable always when not in production for consistency
254
+ plugins . push ( new webpack . NamedModulesPlugin ( ) ) ;
260
255
}
261
256
262
257
if ( this . webpackConfig . useVersioning ) {
You can’t perform that action at this time.
0 commit comments