Skip to content

Commit 789933c

Browse files
authoredOct 1, 2018
Still emit runtime chunk (#5184)
1 parent 02b8c35 commit 789933c

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed
 

‎packages/react-dev-utils/InlineChunkHtmlPlugin.js

+10-7
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,16 @@ class InlineChunkHtmlPlugin {
4343
assets.headTags = assets.headTags.map(tagFunction);
4444
assets.bodyTags = assets.bodyTags.map(tagFunction);
4545
});
46-
hooks.afterEmit.tap('InlineChunkHtmlPlugin', () => {
47-
Object.keys(compilation.assets).forEach(assetName => {
48-
if (this.tests.some(test => assetName.match(test))) {
49-
delete compilation.assets[assetName];
50-
}
51-
});
52-
});
46+
47+
// Still emit the runtime chunk for users who do not use our generated
48+
// index.html file.
49+
// hooks.afterEmit.tap('InlineChunkHtmlPlugin', () => {
50+
// Object.keys(compilation.assets).forEach(assetName => {
51+
// if (this.tests.some(test => assetName.match(test))) {
52+
// delete compilation.assets[assetName];
53+
// }
54+
// });
55+
// });
5356
});
5457
}
5558
}

0 commit comments

Comments
 (0)