mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Let webpack handle contenthash (#4895)
This commit is contained in:
parent
b1459bfd60
commit
919b88509c
|
@ -158,7 +158,7 @@ export default async function getBaseWebpackConfig (dir: string, {dev = false, i
|
|||
filename: ({chunk}) => {
|
||||
// Use `[name]-[contenthash].js` in production
|
||||
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]'
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue