File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ class MiniCssExtractPlugin {
5959 }
6060 }
6161
62+ /** @param {import("webpack").Compiler } compiler */
6263 apply ( compiler ) {
6364 compiler . hooks . thisCompilation . tap ( pluginName , ( compilation ) => {
6465 compilation . dependencyFactories . set (
@@ -149,13 +150,9 @@ class MiniCssExtractPlugin {
149150 this . getChunkModules ( chunk , chunkGraph )
150151 ) . filter ( ( module ) => module . type === MODULE_TYPE ) ;
151152
152- const filenameTemplate =
153- chunk . filenameTemplate ||
154- chunk . hasRuntime ( ) ||
155- chunk . isOnlyInitial ( )
156- ? ( { chunk : chunkData } ) =>
157- this . options . moduleFilename ( chunkData )
158- : this . options . chunkFilename ;
153+ const filenameTemplate = chunk . canBeInitial ( )
154+ ? ( { chunk : chunkData } ) => this . options . moduleFilename ( chunkData )
155+ : this . options . chunkFilename ;
159156
160157 if ( renderedModules . length > 0 ) {
161158 result . push ( {
You can’t perform that action at this time.
0 commit comments