Skip to content

Commit 36c1456

Browse files
committed
fix: use for of instead of forEach for modulesIterable
1 parent 84782d4 commit 36c1456

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ class MiniCssExtractPlugin {
393393

394394
compilation.hooks.optimizeChunks.tap(pluginName, (chunks) => {
395395
for (const chunk of chunks) {
396-
chunk.modulesIterable.forEach((module) => {
396+
for (const module of chunk.modulesIterable) {
397397
// eslint-disable-next-line no-param-reassign
398398
module.dependencies = module.dependencies.filter((dep) => {
399399
const hasCssDep =
@@ -417,7 +417,7 @@ class MiniCssExtractPlugin {
417417
) {
418418
chunk.removeModule(module.issuer);
419419
}
420-
});
420+
}
421421
}
422422
});
423423
});

0 commit comments

Comments
 (0)