feat!: disable mergeDuplicateChunks in development mode#13319
feat!: disable mergeDuplicateChunks in development mode#13319
Conversation
Rsdoctor Bundle Diff Analysis
Found 5 projects in monorepo, 0 projects with changes. 📊 Quick Summary
Generated by Rsdoctor GitHub Action |
There was a problem hiding this comment.
Pull request overview
Updates Rspack’s default for optimization.mergeDuplicateChunks to be mode-dependent, aligning defaults/docs/types/tests with the new behavior (disabled in development, enabled in production).
Changes:
- Change
optimization.mergeDuplicateChunksdefault tofalsein development andtrueotherwise (including production/default mode). - Update English/Chinese docs to show mode-specific defaults for
mergeDuplicateChunks. - Update defaults test snapshots for development-mode expectations (including related optimization defaults shown in snapshots).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| website/docs/zh/config/optimization.mdx | Document mode-dependent defaults for optimization.mergeDuplicateChunks in Chinese docs. |
| website/docs/en/config/optimization.mdx | Document mode-dependent defaults for optimization.mergeDuplicateChunks in English docs. |
| tests/rspack-test/defaultsCases/mode/development.js | Update development-mode defaults snapshot expectations, including mergeDuplicateChunks: false. |
| tests/rspack-test/defaultsCases/cache/cache-filesystem-dev.js | Update development + persistent cache defaults snapshot expectations, including mergeDuplicateChunks: false. |
| packages/rspack/src/config/types.ts | Update type docs to describe the mode-dependent default behavior (production vs development). |
| packages/rspack/src/config/defaults.ts | Implement the mode-dependent default via factory defaulting (F(..., () => !development)). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📦 Binary Size-limit
🙈 Size remains the same at 49.01MB |
|
📝 Benchmark detail: Open
Threshold exceeded: ["arco-pro_development-mode + exec"] |
Merging this PR will not alter performance
Comparing Footnotes
|
Deploying rspack with
|
| Latest commit: |
3514fb6
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://cd827b25.rspack-v2.pages.dev |
| Branch Preview URL: | https://codex-development-mergedupli.rspack-v2.pages.dev |
|
📝 Benchmark detail: Open
|
Summary
optimization.mergeDuplicateChunksdefault tofalsein development mode andtruein productionTesting