Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live Preview: Add the contenthash to the chunk file to resolve the cache issue #86691

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions apps/wpcom-block-editor/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const shouldEmitStats = process.env.EMIT_STATS && process.env.EMIT_STATS !== 'fa
* @param {Object} argv.entry Entry point(s)
* @param {string} argv.outputPath Output path
* @param {string} argv.outputFilename Output filename pattern
* @param {string} argv.outputChunkFilename Output chunk filename pattern
* @returns {Object} webpack config
*/
function getWebpackConfig(
Expand All @@ -41,10 +42,12 @@ function getWebpackConfig(
},
outputPath = path.join( __dirname, 'dist' ),
outputFilename = isDevelopment ? '[name].js' : '[name].min.js',
outputChunkFilename = isDevelopment ? '[name]-[contenthash].js' : '[name]-[contenthash].min.js',
}
) {
const webpackConfig = getBaseWebpackConfig( env, {
entry,
'output-chunk-filename': outputChunkFilename,
'output-filename': outputFilename,
'output-path': outputPath,
} );
Expand Down
Loading