File tree 1 file changed +6
-0
lines changed
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ const {
13
13
Template,
14
14
util : { createHash } ,
15
15
} = webpack ;
16
+ const {
17
+ SyncWaterfallHook,
18
+ } = require ( "tapable" ) ;
16
19
17
20
const MODULE_TYPE = 'css/mini-extract' ;
18
21
@@ -129,6 +132,8 @@ class MiniCssExtractPlugin {
129
132
130
133
apply ( compiler ) {
131
134
compiler . hooks . thisCompilation . tap ( pluginName , ( compilation ) => {
135
+ compilation . hooks . miniCssExtractPluginBeforeLinkAppend = new SyncWaterfallHook ( [ 'source' , 'chunk' , 'hash' ] )
136
+
132
137
compilation . dependencyFactories . set (
133
138
CssDependency ,
134
139
new CssModuleFactory ( )
@@ -377,6 +382,7 @@ class MiniCssExtractPlugin {
377
382
] )
378
383
: '' ,
379
384
'var head = document.getElementsByTagName("head")[0];' ,
385
+ compilation . hooks . miniCssExtractPluginBeforeLinkAppend . call ( '' , chunk , hash ) ,
380
386
'head.appendChild(linkTag);' ,
381
387
] ) ,
382
388
'}).then(function() {' ,
You can’t perform that action at this time.
0 commit comments