Skip to content

Commit 25668ba

Browse files
fix: Applying rollback fixes to updateWebpackConfig, search loader and use object keys
1 parent b116312 commit 25668ba

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,17 @@ class ExtractCssChunks {
433433
node.use.unshift(this.hotLoaderObject);
434434
}
435435
}
436+
if (node && node.loader && Array.isArray(node.loader)) {
437+
const isMiniCss = node.loader.some((l) => {
438+
const needle = l.loader || l;
439+
return needle.includes(pluginName);
440+
});
441+
if (isMiniCss) {
442+
node.loader.unshift(this.hotLoaderObject);
443+
}
444+
}
436445
});
446+
437447
rules.push(rule);
438448

439449
return rules;

0 commit comments

Comments
 (0)