@@ -59,9 +59,9 @@ const compareEntries = (a, b) => {
59
59
}
60
60
} ;
61
61
62
- module . exports = class AutomaticCommonsChunksPlugin {
62
+ module . exports = class SplitChunksPlugin {
63
63
constructor ( options ) {
64
- this . options = AutomaticCommonsChunksPlugin . normalizeOptions ( options ) ;
64
+ this . options = SplitChunksPlugin . normalizeOptions ( options ) ;
65
65
this . alreadyOptimized = new WeakSet ( ) ;
66
66
}
67
67
@@ -72,8 +72,8 @@ module.exports = class AutomaticCommonsChunksPlugin {
72
72
minChunks : options . minChunks || 1 ,
73
73
maxAsyncRequests : options . maxAsyncRequests || 1 ,
74
74
maxInitialRequests : options . maxInitialRequests || 1 ,
75
- getName : AutomaticCommonsChunksPlugin . normalizeName ( options . name ) || ( ( ) => { } ) ,
76
- getCacheGroups : AutomaticCommonsChunksPlugin . normalizeCacheGroups ( options . cacheGroups ) ,
75
+ getName : SplitChunksPlugin . normalizeName ( options . name ) || ( ( ) => { } ) ,
76
+ getCacheGroups : SplitChunksPlugin . normalizeCacheGroups ( options . cacheGroups ) ,
77
77
} ;
78
78
}
79
79
@@ -129,11 +129,11 @@ module.exports = class AutomaticCommonsChunksPlugin {
129
129
results . push ( result ) ;
130
130
}
131
131
}
132
- } else if ( AutomaticCommonsChunksPlugin . checkTest ( option . test , module , chunks ) ) {
132
+ } else if ( SplitChunksPlugin . checkTest ( option . test , module , chunks ) ) {
133
133
if ( results === undefined ) results = [ ] ;
134
134
results . push ( {
135
135
key : key ,
136
- getName : AutomaticCommonsChunksPlugin . normalizeName ( option . name ) ,
136
+ getName : SplitChunksPlugin . normalizeName ( option . name ) ,
137
137
chunks : option . chunks ,
138
138
enforce : option . enforce ,
139
139
minSize : option . minSize ,
@@ -176,11 +176,11 @@ module.exports = class AutomaticCommonsChunksPlugin {
176
176
}
177
177
178
178
apply ( compiler ) {
179
- compiler . hooks . compilation . tap ( "AutomaticCommonsChunksPlugin " , compilation => {
180
- compilation . hooks . unseal . tap ( "AutomaticCommonsChunksPlugin " , ( ) => {
179
+ compiler . hooks . compilation . tap ( "SplitChunksPlugin " , compilation => {
180
+ compilation . hooks . unseal . tap ( "SplitChunksPlugin " , ( ) => {
181
181
this . alreadyOptimized . delete ( compilation ) ;
182
182
} ) ;
183
- compilation . hooks . optimizeChunksAdvanced . tap ( "AutomaticCommonsChunksPlugin " , chunks => {
183
+ compilation . hooks . optimizeChunksAdvanced . tap ( "SplitChunksPlugin " , chunks => {
184
184
if ( this . alreadyOptimized . has ( compilation ) ) return ;
185
185
this . alreadyOptimized . add ( compilation ) ;
186
186
// Give each selected chunk an index (to create strings from chunks)
0 commit comments