File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
packages/react-scripts/config Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -277,7 +277,10 @@ module.exports = function(webpackEnv) {
277
277
} ,
278
278
// Keep the runtime chunk separated to enable long term caching
279
279
// https://twitter.com/wSokra/status/969679223278505985
280
- runtimeChunk : true ,
280
+ // https://github.com/facebook/create-react-app/issues/5358
281
+ runtimeChunk : {
282
+ name : entrypoint => `runtime-${ entrypoint . name } ` ,
283
+ } ,
281
284
} ,
282
285
resolve : {
283
286
// This allows you to set a fallback for where Webpack should look for modules.
@@ -589,9 +592,10 @@ module.exports = function(webpackEnv) {
589
592
) ,
590
593
// Inlines the webpack runtime script. This script is too small to warrant
591
594
// a network request.
595
+ // https://github.com/facebook/create-react-app/issues/5358
592
596
isEnvProduction &&
593
597
shouldInlineRuntimeChunk &&
594
- new InlineChunkHtmlPlugin ( HtmlWebpackPlugin , [ / r u n t i m e ~ .+ [ . ] j s / ] ) ,
598
+ new InlineChunkHtmlPlugin ( HtmlWebpackPlugin , [ / r u n t i m e - .+ [ . ] j s / ] ) ,
595
599
// Makes some environment variables available in index.html.
596
600
// The public URL is available as %PUBLIC_URL% in index.html, e.g.:
597
601
// <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
You can’t perform that action at this time.
0 commit comments