Skip to content

Commit b8b95cf

Browse files
committed
Use compilation instead of this
1 parent eca7bad commit b8b95cf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/optimize/ChunkModuleIdRangePlugin.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ class ChunkModuleIdRangePlugin {
1111
const options = this.options;
1212
compiler.hooks.compilation.tap("ChunkModuleIdRangePlugin", compilation => {
1313
compilation.hooks.moduleIds.tap("ChunkModuleIdRangePlugin", modules => {
14-
const chunk = this.chunks.find(chunk => chunk.name === options.name);
14+
const chunk = compilation.chunks.find(
15+
chunk => chunk.name === options.name
16+
);
1517
if (!chunk)
1618
throw new Error(
1719
"ChunkModuleIdRangePlugin: Chunk with name '" +

0 commit comments

Comments
 (0)