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
ce92c450
Unverified
Commit
ce92c450
authored
Mar 06, 2024
by
Tobias Koppers
Committed by
GitHub
Mar 06, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix graph update (#62933)
### What? fixup for #62927 Closes PACK-2672
parent
8f5107de
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
7 deletions
+17
-7
merge-css-chunks-plugin.ts
...next/src/build/webpack/plugins/merge-css-chunks-plugin.ts
+17
-7
No files found.
packages/next/src/build/webpack/plugins/merge-css-chunks-plugin.ts
View file @
ce92c450
...
@@ -135,19 +135,29 @@ export class MergeCssChunksPlugin {
...
@@ -135,19 +135,29 @@ export class MergeCssChunksPlugin {
*/
*/
function
updateInfoForMerging
(
removedChunk
:
Chunk
,
newChunk
:
Chunk
)
{
function
updateInfoForMerging
(
removedChunk
:
Chunk
,
newChunk
:
Chunk
)
{
const
info
=
cssChunkInfo
.
get
(
removedChunk
)
!
const
info
=
cssChunkInfo
.
get
(
removedChunk
)
!
const
newInfo
=
cssChunkInfo
.
get
(
newChunk
)
!
for
(
const
[
entrypoint
,
entryInfo
]
of
info
.
entrypoints
)
{
for
(
const
[
entrypoint
,
entryInfo
]
of
info
.
entrypoints
)
{
if
(
entryInfo
.
prev
===
newChunk
)
{
const
prev
=
entryInfo
.
prev
!==
newChunk
?
entryInfo
.
prev
:
null
const
prevInfo
=
cssChunkInfo
.
get
(
entryInfo
.
prev
)
!
const
next
=
entryInfo
.
next
!==
newChunk
?
entryInfo
.
next
:
null
prevInfo
.
entrypoints
.
get
(
entrypoint
)
!
.
next
=
entryInfo
.
next
if
(
prev
)
{
}
else
if
(
entryInfo
.
prev
)
{
const
prevInfo
=
cssChunkInfo
.
get
(
prev
)
!
const
prevInfo
=
cssChunkInfo
.
get
(
entryInfo
.
prev
)
!
prevInfo
.
entrypoints
.
get
(
entrypoint
)
!
.
next
=
newChunk
prevInfo
.
entrypoints
.
get
(
entrypoint
)
!
.
next
=
newChunk
}
}
if
(
entryInfo
.
next
)
{
if
(
next
)
{
const
nextInfo
=
cssChunkInfo
.
get
(
entryInfo
.
next
)
!
const
nextInfo
=
cssChunkInfo
.
get
(
next
)
!
nextInfo
.
entrypoints
.
get
(
entrypoint
)
!
.
prev
=
newChunk
nextInfo
.
entrypoints
.
get
(
entrypoint
)
!
.
prev
=
newChunk
}
}
cssChunksForChunkGroup
.
get
(
entrypoint
)
!
.
delete
(
removedChunk
)
cssChunksForChunkGroup
.
get
(
entrypoint
)
!
.
delete
(
removedChunk
)
let
newEntryInfo
=
newInfo
.
entrypoints
.
get
(
entrypoint
)
if
(
newEntryInfo
!==
undefined
)
{
newEntryInfo
.
prev
=
newEntryInfo
.
prev
===
removedChunk
?
prev
:
newEntryInfo
.
prev
newEntryInfo
.
next
=
newEntryInfo
.
next
===
removedChunk
?
next
:
newEntryInfo
.
next
}
else
{
newEntryInfo
=
{
prev
,
next
}
newInfo
.
entrypoints
.
set
(
entrypoint
,
newEntryInfo
)
}
}
}
cssChunkInfo
.
delete
(
removedChunk
)
cssChunkInfo
.
delete
(
removedChunk
)
return
info
return
info
...
...
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