Unverified Commit 96f9945e authored by Tobias Koppers's avatar Tobias Koppers Committed by GitHub

server doesn't need to be contenthashing at all (#25251)

contenthashing is not useful for the server

cc @ijjk 
parent 95135727
......@@ -825,7 +825,7 @@ export default async function getBaseWebpackConfig(
splitChunks: isServer
? isWebpack5
? ({
filename: `${dev ? '[name]' : '[name].[contenthash]'}.js`,
filename: '[name].js',
// allow to split entrypoints
chunks: 'all',
// size of files is not so relevant for server build
......@@ -931,7 +931,7 @@ export default async function getBaseWebpackConfig(
: 'static/webpack/[hash].hot-update.json',
// This saves chunks with the name given via `import()`
chunkFilename: isServer
? `${dev ? '[name]' : '[name].[contenthash]'}.js`
? '[name].js'
: `static/chunks/${isDevFallback ? 'fallback/' : ''}${
dev ? '[name]' : '[name].[contenthash]'
}.js`,
......
......@@ -129,7 +129,7 @@ describe('Build Output', () => {
expect(parseFloat(err404Size)).toBeCloseTo(gz ? 3.06 : 8.15, 1)
expect(err404Size.endsWith('kB')).toBe(true)
expect(parseFloat(err404FirstLoad)).toBeCloseTo(gz ? 66.5 : 203, 1)
expect(parseFloat(err404FirstLoad)).toBeCloseTo(gz ? 66.4 : 203, 1)
expect(err404FirstLoad.endsWith('kB')).toBe(true)
expect(parseFloat(sharedByAll)).toBeCloseTo(gz ? 63.4 : 195, 1)
......
......@@ -2383,11 +2383,6 @@
call-me-maybe "^1.0.1"
glob-to-regexp "^0.3.0"
"@next/eslint-plugin-next@^10.1.3":
version "10.1.3"
resolved "https://registry.yarnpkg.com/@next/eslint-plugin-next/-/eslint-plugin-next-10.1.3.tgz#739743aa33aed28d97e670b9f80b84440cf2a3c7"
integrity sha512-KrZUb6cHXt/rPhN9bSrlVLAq+9LyNOWurqbrUww3OXmrFlXBDI8W6Z0ToDkQMkIH6gTtmpGbuctxCkQ2pgeXzQ==
"@nodelib/fs.scandir@2.1.3":
version "2.1.3"
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b"
......
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