From 789933c0aa50735fef6a0d5ee0797adf44a653a9 Mon Sep 17 00:00:00 2001
From: Joe Haddad <timer150@gmail.com>
Date: Sun, 30 Sep 2018 20:58:45 -0400
Subject: [PATCH] Still emit runtime chunk (#5184)

---
 .../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 8f0cd45c7..e38ed53d3 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];
+      //     }
+      //   });
+      // });
     });
   }
 }
-- 
GitLab