Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
96f9945e
Unverified
Commit
96f9945e
authored
May 19, 2021
by
Tobias Koppers
Committed by
GitHub
May 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server doesn't need to be contenthashing at all (#25251)
contenthashing is not useful for the server cc @ijjk
parent
95135727
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
8 deletions
+3
-8
webpack-config.ts
packages/next/build/webpack-config.ts
+2
-2
index.test.js
test/integration/build-output/test/index.test.js
+1
-1
yarn.lock
yarn.lock
+0
-5
No files found.
packages/next/build/webpack-config.ts
View file @
96f9945e
...
@@ -825,7 +825,7 @@ export default async function getBaseWebpackConfig(
...
@@ -825,7 +825,7 @@ export default async function getBaseWebpackConfig(
splitChunks
:
isServer
splitChunks
:
isServer
?
isWebpack5
?
isWebpack5
?
({
?
({
filename
:
`
${
dev
?
'[name]'
:
'[name].[contenthash]'
}
.js`
,
filename
:
'[name].js'
,
// allow to split entrypoints
// allow to split entrypoints
chunks
:
'all'
,
chunks
:
'all'
,
// size of files is not so relevant for server build
// size of files is not so relevant for server build
...
@@ -931,7 +931,7 @@ export default async function getBaseWebpackConfig(
...
@@ -931,7 +931,7 @@ export default async function getBaseWebpackConfig(
:
'static/webpack/[hash].hot-update.json'
,
:
'static/webpack/[hash].hot-update.json'
,
// This saves chunks with the name given via `import()`
// This saves chunks with the name given via `import()`
chunkFilename
:
isServer
chunkFilename
:
isServer
?
`
${
dev
?
'[name]'
:
'[name].[contenthash]'
}
.js`
?
'[name].js'
:
`static/chunks/
${
isDevFallback
?
'fallback/'
:
''
}${
:
`static/chunks/
${
isDevFallback
?
'fallback/'
:
''
}${
dev
?
'[name]'
:
'[name].[contenthash]'
dev
?
'[name]'
:
'[name].[contenthash]'
}
.js`
,
}
.js`
,
...
...
test/integration/build-output/test/index.test.js
View file @
96f9945e
...
@@ -129,7 +129,7 @@ describe('Build Output', () => {
...
@@ -129,7 +129,7 @@ describe('Build Output', () => {
expect
(
parseFloat
(
err404Size
)).
toBeCloseTo
(
gz
?
3.06
:
8.15
,
1
)
expect
(
parseFloat
(
err404Size
)).
toBeCloseTo
(
gz
?
3.06
:
8.15
,
1
)
expect
(
err404Size
.
endsWith
(
'kB'
)).
toBe
(
true
)
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
(
err404FirstLoad
.
endsWith
(
'kB'
)).
toBe
(
true
)
expect
(
parseFloat
(
sharedByAll
)).
toBeCloseTo
(
gz
?
63.4
:
195
,
1
)
expect
(
parseFloat
(
sharedByAll
)).
toBeCloseTo
(
gz
?
63.4
:
195
,
1
)
...
...
yarn.lock
View file @
96f9945e
...
@@ -2383,11 +2383,6 @@
...
@@ -2383,11 +2383,6 @@
call-me-maybe "^1.0.1"
call-me-maybe "^1.0.1"
glob-to-regexp "^0.3.0"
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":
"@nodelib/fs.scandir@2.1.3":
version "2.1.3"
version "2.1.3"
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b"
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment