Commit 919b8850 authored by Sayuti Daniel's avatar Sayuti Daniel Committed by Tim Neutkens

Let webpack handle contenthash (#4895)

parent b1459bfd
...@@ -158,7 +158,7 @@ export default async function getBaseWebpackConfig (dir: string, {dev = false, i ...@@ -158,7 +158,7 @@ export default async function getBaseWebpackConfig (dir: string, {dev = false, i
filename: ({chunk}) => { filename: ({chunk}) => {
// Use `[name]-[contenthash].js` in production // Use `[name]-[contenthash].js` in production
if (!dev && (chunk.name === CLIENT_STATIC_FILES_RUNTIME_MAIN || chunk.name === CLIENT_STATIC_FILES_RUNTIME_WEBPACK)) { if (!dev && (chunk.name === CLIENT_STATIC_FILES_RUNTIME_MAIN || chunk.name === CLIENT_STATIC_FILES_RUNTIME_WEBPACK)) {
return chunk.name.replace(/\.js$/, '-' + chunk.contentHash.javascript + '.js') return chunk.name.replace(/\.js$/, '-[contenthash].js')
} }
return '[name]' return '[name]'
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment