From 915bed6bc1e5f660162adbc0881614820c0026e2 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Sun, 30 Sep 2018 20:38:30 -0400 Subject: [PATCH] Still emit runtime chunk --- .../react-dev-utils/InlineChunkHtmlPlugin.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/packages/react-dev-utils/InlineChunkHtmlPlugin.js b/packages/react-dev-utils/InlineChunkHtmlPlugin.js index 8f0cd45c717..e38ed53d3fb 100644 --- a/packages/react-dev-utils/InlineChunkHtmlPlugin.js +++ b/packages/react-dev-utils/InlineChunkHtmlPlugin.js @@ -43,13 +43,16 @@ class InlineChunkHtmlPlugin { assets.headTags = assets.headTags.map(tagFunction); assets.bodyTags = assets.bodyTags.map(tagFunction); }); - hooks.afterEmit.tap('InlineChunkHtmlPlugin', () => { - Object.keys(compilation.assets).forEach(assetName => { - if (this.tests.some(test => assetName.match(test))) { - delete compilation.assets[assetName]; - } - }); - }); + + // Still emit the runtime chunk for users who do not use our generated + // index.html file. + // hooks.afterEmit.tap('InlineChunkHtmlPlugin', () => { + // Object.keys(compilation.assets).forEach(assetName => { + // if (this.tests.some(test => assetName.match(test))) { + // delete compilation.assets[assetName]; + // } + // }); + // }); }); } }