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
ebddbf1b
Unverified
Commit
ebddbf1b
authored
Apr 20, 2023
by
Shu Ding
Committed by
GitHub
Apr 20, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test case for #48583 and ignore hot-update scripts (#48587)
Add a test case for #48583.
parent
acd3b25e
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
0 deletions
+28
-0
flight-manifest-plugin.ts
.../next/src/build/webpack/plugins/flight-manifest-plugin.ts
+2
-0
comp.js
test/e2e/app-dir/dynamic/app/chunk-loading/comp.js
+5
-0
page.js
test/e2e/app-dir/dynamic/app/chunk-loading/page.js
+11
-0
page.js
test/e2e/app-dir/dynamic/app/chunk-loading/server/page.js
+5
-0
dynamic.test.ts
test/e2e/app-dir/dynamic/dynamic.test.ts
+5
-0
No files found.
packages/next/src/build/webpack/plugins/flight-manifest-plugin.ts
View file @
ebddbf1b
...
@@ -263,6 +263,8 @@ export class ClientReferenceManifestPlugin {
...
@@ -263,6 +263,8 @@ export class ClientReferenceManifestPlugin {
// It's possible that a chunk also emits CSS files, that will
// It's possible that a chunk also emits CSS files, that will
// be handled separatedly.
// be handled separatedly.
if
(
!
file
.
endsWith
(
'.js'
))
return
null
if
(
!
file
.
endsWith
(
'.js'
))
return
null
if
(
file
.
endsWith
(
'.hot-update.js'
))
return
null
return
requiredChunk
.
id
+
':'
+
file
return
requiredChunk
.
id
+
':'
+
file
})
})
})
})
...
...
test/e2e/app-dir/dynamic/app/chunk-loading/comp.js
0 → 100644
View file @
ebddbf1b
'use client'
export
default
function
()
{
return
<
h1
>
hello
<
/h1
>
}
test/e2e/app-dir/dynamic/app/chunk-loading/page.js
0 → 100644
View file @
ebddbf1b
// This file is needed for the test, to ensure that the "comp.js" module is
// created as a dynamic import chunk.
'use client'
export
default
function
Page
()
{
import
(
'./comp'
).
then
((
m
)
=>
{
console
.
log
(
m
)
})
return
null
}
test/e2e/app-dir/dynamic/app/chunk-loading/server/page.js
0 → 100644
View file @
ebddbf1b
import
Comp
from
'../comp'
export
default
function
Page
()
{
return
<
Comp
/>
}
test/e2e/app-dir/dynamic/dynamic.test.ts
View file @
ebddbf1b
...
@@ -52,5 +52,10 @@ createNextDescribe(
...
@@ -52,5 +52,10 @@ createNextDescribe(
await
browser
.
elementByCss
(
'#css-text-dynamic-no-ssr-client'
).
text
()
await
browser
.
elementByCss
(
'#css-text-dynamic-no-ssr-client'
).
text
()
).
toBe
(
'next-dynamic dynamic no ssr on client:suffix'
)
).
toBe
(
'next-dynamic dynamic no ssr on client:suffix'
)
})
})
it
(
'should generate correct client manifest for dynamic chunks'
,
async
()
=>
{
const
$
=
await
next
.
render$
(
'/chunk-loading/server'
)
expect
(
$
(
'h1'
).
text
()).
toBe
(
'hello'
)
})
}
}
)
)
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