Skip to content

Commit

Permalink
Still emit runtime chunk (#5184)
Browse files Browse the repository at this point in the history
  • Loading branch information
Timer committed Oct 1, 2018
1 parent 02b8c35 commit 789933c
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions packages/react-dev-utils/InlineChunkHtmlPlugin.js
Expand Up @@ -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];
// }
// });
// });
});
}
}
Expand Down

0 comments on commit 789933c

Please sign in to comment.