Skip to content
This repository was archived by the owner on Jun 8, 2022. It is now read-only.

Commit c52345e

Browse files
committed
Template literal used to concat manifest lookup
1 parent 1c4f736 commit c52345e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/chunk-manifest-webpack-plugin.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class ChunkManifestPlugin {
4343
}
4444
return c.chunks.reduce(registerChunk, manifest);
4545
}, {});
46+
4647
oldChunkFilename = this.outputOptions.chunkFilename;
4748
this.outputOptions.chunkFilename = "__CHUNK_MANIFEST__";
4849
// mark as asset for emitting
@@ -60,15 +61,15 @@ class ChunkManifestPlugin {
6061
_,
6162
chunk,
6263
hash,
63-
chunkIdVar
64+
chunkIdVariableName
6465
) {
6566
if (oldChunkFilename) {
6667
this.outputOptions.chunkFilename = oldChunkFilename;
6768
}
6869

6970
return _.replace(
7071
'"__CHUNK_MANIFEST__"',
71-
'window["' + manifestVariable + '"][' + chunkIdVar + "]"
72+
`window["${manifestVariable}"][${chunkIdVariableName}]`
7273
);
7374
});
7475
});

0 commit comments

Comments
 (0)