Skip to content

Optimise rspack/webpack chunk collection with Set deduplication#270

Merged
yoannmoinet merged 2 commits intomasterfrom
yoann/optimise-rspack-chunks
Feb 17, 2026
Merged

Optimise rspack/webpack chunk collection with Set deduplication#270
yoannmoinet merged 2 commits intomasterfrom
yoann/optimise-rspack-chunks

Conversation

@yoannmoinet
Copy link
Member

@yoannmoinet yoannmoinet commented Feb 17, 2026

What and why?

The getAllChunksFromGroup helper in the build report plugin could return duplicate chunks when the same chunk appeared in multiple chunk groups. This caused redundant processing during entry file collection.

It was also failing the build in some instances, with OOM errors.

How?

Replace Chunk[] with Set<Chunk> in getAllChunksFromGroup to naturally deduplicate chunks as they're collected from chunk groups and their children.

🤖 Generated with Claude Code

@yoannmoinet yoannmoinet merged commit 1e057fd into master Feb 17, 2026
5 checks passed
@yoannmoinet yoannmoinet deleted the yoann/optimise-rspack-chunks branch February 17, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants