Skip to content

Commit 39a3c6e

Browse files
committed
Ignore hot-update files in the SharedEntryConcatPlugin
1 parent f35841a commit 39a3c6e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/webpack/shared-entry-concat-plugin.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@ function SharedEntryConcatPlugin(sharedEntryName) {
1818

1919
function getChunkFilename(compilation, chunkName) {
2020
const chunk = compilation.namedChunks.get(chunkName);
21+
const additionalChunkAssets = compilation.additionalChunkAssets || [];
2122

2223
if (!chunk) {
2324
throw new Error(`Cannot find chunk ${chunkName}`);
2425
}
2526

2627
const jsFiles = chunk.files.filter(filename => {
27-
return /\.js$/.test(filename);
28+
return /\.js$/.test(filename) && !additionalChunkAssets.includes(filename);
2829
});
2930

3031
if (jsFiles.length !== 1) {

0 commit comments

Comments
 (0)