Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new linting rule module-mixed-chunks (E1006) to detect when a module is included in both initial and async chunks, which can lead to code duplication and increased bundle size.
Changes:
- Added
ModuleMixedChunksRuleStoreDatatype definition and E1006 error code with documentation - Implemented the
module-mixed-chunksrule that checks for modules appearing in both initial and async chunks - Created UI component
ModuleMixedChunksAlertCollapseto display violations in the Rsdoctor report
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/types/src/rule/data.ts | Adds ModuleMixedChunksRuleStoreData interface for storing rule violation data |
| packages/types/src/rule/code/E1006.ts | Defines error code E1006 with description and solutions for the mixed chunks issue |
| packages/types/src/rule/code/index.ts | Registers E1006 error code in the rule error map |
| packages/types/src/plugin/internal-rules.ts | Adds 'E1006' and 'module-mixed-chunks' to internal rule type definitions |
| packages/core/src/rules/rules/module-mixed-chunks/types.ts | Defines configuration interface with ignore pattern support |
| packages/core/src/rules/rules/module-mixed-chunks/index.ts | Implements the rule logic to detect modules in both initial and async chunks |
| packages/core/src/rules/rules/index.ts | Exports and registers the new rule in the rules array |
| packages/components/src/components/Alerts/collapse-module-mixed-chunks.tsx | Creates UI component to display mixed chunks violations with initial and async chunk details |
| packages/components/src/components/Alerts/bundle-alert.tsx | Integrates E1006 tab and component into the bundle alerts UI |
| examples/rsbuild-minimal/src/utils/shared.ts | Adds example file (incomplete - missing exports) |
| examples/rsbuild-minimal/src/components/AsyncComponent.tsx | Adds example component (not used, has broken imports) |
| examples/rsbuild-minimal/src/App.tsx | Adds dynamic import to demonstrate mixed chunks scenario |
| examples/rsbuild-minimal/rsbuild.config.ts | Configures example to trigger the module-mixed-chunks rule |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Deploying rsdoctor with
|
| Latest commit: |
d6a2df3
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://10da0bed.rsdoctor.pages.dev |
| Branch Preview URL: | https://feat-rule-mixed-chunk-type-m.rsdoctor.pages.dev |
f658993 to
988cb6c
Compare
fi3ework
approved these changes
Jan 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Related Links