Skip to content

Commit 4d533d4

Browse files
Doug Rossianschmitz
authored andcommitted
Change runtime chunk name separator from tilde to dash (#7679)
1 parent 8b7b819 commit 4d533d4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/react-scripts/config/webpack.config.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,10 @@ module.exports = function(webpackEnv) {
277277
},
278278
// Keep the runtime chunk separated to enable long term caching
279279
// 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+
},
281284
},
282285
resolve: {
283286
// This allows you to set a fallback for where Webpack should look for modules.
@@ -589,9 +592,10 @@ module.exports = function(webpackEnv) {
589592
),
590593
// Inlines the webpack runtime script. This script is too small to warrant
591594
// a network request.
595+
// https://github.com/facebook/create-react-app/issues/5358
592596
isEnvProduction &&
593597
shouldInlineRuntimeChunk &&
594-
new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/runtime~.+[.]js/]),
598+
new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/runtime-.+[.]js/]),
595599
// Makes some environment variables available in index.html.
596600
// The public URL is available as %PUBLIC_URL% in index.html, e.g.:
597601
// <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">

0 commit comments

Comments
 (0)