Skip to content

Commit 9af7499

Browse files
committed
fix(index): remove forceHookRuntime option
1 parent efaf2e1 commit 9af7499

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ class MiniCssExtractPlugin {
116116
{
117117
filename: '[name].css',
118118
checkCssChunk: true,
119-
forceHookRuntime: false,
120119
},
121120
options
122121
);
@@ -253,7 +252,7 @@ class MiniCssExtractPlugin {
253252
const { mainTemplate } = compilation;
254253
mainTemplate.hooks.localVars.tap(pluginName, (source, chunk, hash) => {
255254
const chunkMap = this.getCssChunkObject(chunk);
256-
if (this.options.forceHookRuntime || Object.keys(chunkMap).length > 0) {
255+
if (Object.keys(chunkMap).length > 0) {
257256
const chunkMaps = chunk.getChunkMaps();
258257
const linkHrefPath = mainTemplate.getAssetPath(
259258
JSON.stringify(this.options.chunkFilename),
@@ -328,7 +327,7 @@ class MiniCssExtractPlugin {
328327
});
329328
mainTemplate.hooks.requireEnsure.tap(pluginName, (source, chunk) => {
330329
const chunkMap = this.getCssChunkObject(chunk);
331-
if (this.options.forceHookRuntime || Object.keys(chunkMap).length > 0) {
330+
if (Object.keys(chunkMap).length > 0) {
332331
const checkCssChunk = this.options.checkCssChunk;
333332
return Template.asString([
334333
source,

0 commit comments

Comments
 (0)