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
dfe2825b
Unverified
Commit
dfe2825b
authored
Aug 18, 2026
by
David Alexandru Ilie
Committed by
GitHub
Aug 18, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix webpack client references for hash filenames
parent
0b7e96f4
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
1 deletion
+49
-1
flight-manifest-plugin.ts
.../next/src/build/webpack/plugins/flight-manifest-plugin.ts
+1
-1
counter#client.tsx
...p-dir/webpack-hash-client-filename/app/counter#client.tsx
+13
-0
layout.tsx
test/e2e/app-dir/webpack-hash-client-filename/app/layout.tsx
+8
-0
page.tsx
test/e2e/app-dir/webpack-hash-client-filename/app/page.tsx
+5
-0
next.config.js
test/e2e/app-dir/webpack-hash-client-filename/next.config.js
+6
-0
webpack-hash-client-filename.test.ts
...hash-client-filename/webpack-hash-client-filename.test.ts
+16
-0
No files found.
packages/next/src/build/webpack/plugins/flight-manifest-plugin.ts
View file @
dfe2825b
...
@@ -319,7 +319,7 @@ export class ClientReferenceManifestPlugin {
...
@@ -319,7 +319,7 @@ export class ClientReferenceManifestPlugin {
let
resource
=
let
resource
=
mod
.
type
===
'css/mini-extract'
mod
.
type
===
'css/mini-extract'
?
mod
.
identifier
().
slice
(
mod
.
identifier
().
lastIndexOf
(
'!'
)
+
1
)
?
mod
.
identifier
().
slice
(
mod
.
identifier
().
lastIndexOf
(
'!'
)
+
1
)
:
mod
.
resource
:
mod
.
resource
ResolveData
?.
path
||
mod
.
resource
if
(
!
resource
)
{
if
(
!
resource
)
{
return
return
...
...
test/e2e/app-dir/webpack-hash-client-filename/app/counter#client.tsx
0 → 100644
View file @
dfe2825b
'use client'
import
{
useState
}
from
'react'
export
default
function
Counter
()
{
const
[
count
,
setCount
]
=
useState
(
0
)
return
(
<
button
id=
"counter"
onClick=
{
()
=>
setCount
((
value
)
=>
value
+
1
)
}
>
count:
{
count
}
</
button
>
)
}
test/e2e/app-dir/webpack-hash-client-filename/app/layout.tsx
0 → 100644
View file @
dfe2825b
import
{
ReactNode
}
from
'react'
export
default
function
Root
({
children
}:
{
children
:
ReactNode
})
{
return
(
<
html
>
<
body
>
{
children
}
</
body
>
</
html
>
)
}
test/e2e/app-dir/webpack-hash-client-filename/app/page.tsx
0 → 100644
View file @
dfe2825b
import
Counter
from
'./counter#client'
export
default
function
Page
()
{
return
<
Counter
/>
}
test/e2e/app-dir/webpack-hash-client-filename/next.config.js
0 → 100644
View file @
dfe2825b
/**
* @type {import('next').NextConfig}
*/
const
nextConfig
=
{}
module
.
exports
=
nextConfig
test/e2e/app-dir/webpack-hash-client-filename/webpack-hash-client-filename.test.ts
0 → 100644
View file @
dfe2825b
import
{
nextTestSetup
}
from
'e2e-utils'
describe
(
'webpack-hash-client-filename'
,
()
=>
{
const
{
next
}
=
nextTestSetup
({
files
:
__dirname
,
})
it
(
'renders and hydrates a Client Component whose filename contains #'
,
async
()
=>
{
const
browser
=
await
next
.
browser
(
'/'
)
expect
(
await
browser
.
elementByCss
(
'#counter'
).
text
()).
toBe
(
'count: 0'
)
await
browser
.
elementByCss
(
'#counter'
).
click
()
expect
(
await
browser
.
elementByCss
(
'#counter'
).
text
()).
toBe
(
'count: 1'
)
})
})
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