Skip to content

Commit 7ee6aaa

Browse files
Use cache-busting Webpack chunk names in development (#2920)
#2864 introduced Webpack bundle splitting. While the chunk names are based on a rolling integer number in production, they are deterministically computed based on the filename in development. Browser caching causes this to be annoying in development. This PR changes the naming scheme to instead depend on the content hash, eliminating the issue.
1 parent 151b5b1 commit 7ee6aaa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

webpack.mix.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ mix.webpackConfig({
112112
stats: {
113113
children: true,
114114
},
115+
output: {
116+
chunkFilename: 'assets/js/[contenthash].js',
117+
},
115118
optimization: {
116119
runtimeChunk: false,
117120
},

0 commit comments

Comments
 (0)