@@ -28,7 +28,6 @@ const miniCssExtractPluginUtil = require('./plugins/mini-css-extract');
28
28
const deleteUnusedEntriesPluginUtil = require ( './plugins/delete-unused-entries' ) ;
29
29
const entryFilesManifestPlugin = require ( './plugins/entry-files-manifest' ) ;
30
30
const manifestPluginUtil = require ( './plugins/manifest' ) ;
31
- const versioningPluginUtil = require ( './plugins/versioning' ) ;
32
31
const variableProviderPluginUtil = require ( './plugins/variable-provider' ) ;
33
32
const cleanPluginUtil = require ( './plugins/clean' ) ;
34
33
const definePluginUtil = require ( './plugins/define' ) ;
@@ -423,9 +422,7 @@ class ConfigGenerator {
423
422
buildPluginsConfig ( ) {
424
423
const plugins = [ ] ;
425
424
426
- if ( this . webpackConfig . extractCss ) {
427
- miniCssExtractPluginUtil ( plugins , this . webpackConfig ) ;
428
- }
425
+ miniCssExtractPluginUtil ( plugins , this . webpackConfig ) ;
429
426
430
427
// register the pure-style entries that should be deleted
431
428
deleteUnusedEntriesPluginUtil ( plugins , this . webpackConfig ) ;
@@ -435,8 +432,6 @@ class ConfigGenerator {
435
432
// Dump the manifest.json file
436
433
manifestPluginUtil ( plugins , this . webpackConfig ) ;
437
434
438
- versioningPluginUtil ( plugins , this . webpackConfig ) ;
439
-
440
435
variableProviderPluginUtil ( plugins , this . webpackConfig ) ;
441
436
442
437
cleanPluginUtil ( plugins , this . webpackConfig ) ;
@@ -489,29 +484,12 @@ class ConfigGenerator {
489
484
terserPluginUtil ( this . webpackConfig ) ,
490
485
optimizeCssAssetsUtil ( this . webpackConfig )
491
486
] ;
492
- } else {
493
- // see versioning.js: this gives us friendly module names,
494
- // which can be useful for debugging, especially with HMR
495
- optimization . namedModules = true ;
496
487
}
497
- // https://github.com/webpack/webpack/issues/8354
498
- // likely can be removed in Webpack 5
499
- // https://github.com/webpack/webpack/pull/8374
500
- optimization . chunkIds = 'named' ;
501
488
502
- let splitChunks = {
489
+ const splitChunks = {
503
490
chunks : this . webpackConfig . shouldSplitEntryChunks ? 'all' : 'async'
504
491
} ;
505
492
506
- // This causes the split filenames (& internal names) to be,
507
- // for example, 0.js. This is needed so that the filename
508
- // doesn't change suddenly when another entry needs that same
509
- // shared code (e.g. vendor~entry1~entry2.js).
510
- // https://github.com/webpack/webpack/issues/8426#issuecomment-442375207
511
- if ( this . webpackConfig . shouldSplitEntryChunks && this . webpackConfig . isProduction ( ) ) {
512
- splitChunks . name = false ;
513
- }
514
-
515
493
if ( this . webpackConfig . sharedCommonsEntryName ) {
516
494
const cacheGroups = { } ;
517
495
cacheGroups [ this . webpackConfig . sharedCommonsEntryName ] = {
@@ -599,7 +577,7 @@ class ConfigGenerator {
599
577
600
578
buildWatchOptionsConfig ( ) {
601
579
const watchOptions = {
602
- ignored : / n o d e _ m o d u l e s /
580
+ ignored : ' node_modules'
603
581
} ;
604
582
605
583
return applyOptionsCallback (
0 commit comments