Skip to content

Commit 6c8e2e5

Browse files
authored
Use contenthash instead of chunkhash for better long-term caching (#6387)
1 parent 87191e6 commit 6c8e2e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,11 @@ module.exports = function(webpackEnv) {
161161
// There will be one main bundle, and one file per asynchronous chunk.
162162
// In development, it does not produce real files.
163163
filename: isEnvProduction
164-
? 'static/js/[name].[chunkhash:8].js'
164+
? 'static/js/[name].[contenthash:8].js'
165165
: isEnvDevelopment && 'static/js/bundle.js',
166166
// There are also additional JS chunk files if you use code splitting.
167167
chunkFilename: isEnvProduction
168-
? 'static/js/[name].[chunkhash:8].chunk.js'
168+
? 'static/js/[name].[contenthash:8].chunk.js'
169169
: isEnvDevelopment && 'static/js/[name].chunk.js',
170170
// We inferred the "public path" (such as / or /my-project) from homepage.
171171
// We use "/" in development.

0 commit comments

Comments
 (0)