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 @@ -324,20 +324,15 @@ class ConfigGenerator {
324
324
* * https://github.com/webpack/webpack.js.org/issues/652#issuecomment-273324529
325
325
* * https://webpack.js.org/guides/caching/#deterministic-hashes
326
326
*/
327
- let moduleNamePlugin ;
328
327
if ( this . webpackConfig . isProduction ( ) ) {
329
328
// shorter, and obfuscated module ids (versus NamedModulesPlugin)
330
329
// makes the final assets *slightly* larger, but prevents contents
331
330
// from sometimes changing when nothing really changed
332
- moduleNamePlugin = new webpack . HashedModuleIdsPlugin ( ) ;
331
+ plugins . push ( new webpack . HashedModuleIdsPlugin ( ) ) ;
333
332
} else {
334
333
// human-readable module names, helps debug in HMR
335
- // enable always when ! production for consistency
336
- moduleNamePlugin = new webpack . NamedModulesPlugin ( ) ;
337
- }
338
-
339
- if ( moduleNamePlugin ) {
340
- plugins . push ( moduleNamePlugin ) ;
334
+ // enable always when not in production for consistency
335
+ plugins . push ( new webpack . NamedModulesPlugin ( ) ) ;
341
336
}
342
337
343
338
if ( this . webpackConfig . useVersioning ) {
You can’t perform that action at this time.
0 commit comments