fix: separate inline assets by environment to prevent multi-compiler overrides#6889
Merged
GiveMe-A-Name merged 1 commit intomainfrom Jan 5, 2026
Conversation
✅ Deploy Preview for rsbuild ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug in the inline-chunk plugin where assets were being overridden in multi-compiler scenarios due to a shared inlinedAssets Set across all environments.
Key Changes:
- Replace single shared Set with a Map structure that maintains separate Sets per environment
- Add
getInlinedAssetsSethelper function for lazy initialization of per-environment asset tracking - Update all inline processing functions to accept and use environment-specific asset Sets
- Add defensive asset existence check in the cleanup stage
- Add comprehensive E2E test validating independent inlining across multiple environments
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/core/src/plugins/inlineChunk.ts | Refactored asset tracking from single Set to Map-based per-environment Sets, updated function signatures to pass environment-specific Sets, and added asset existence validation |
| e2e/cases/output/inline-chunk/index.test.ts | Added test case verifying that assets are inlined independently for multiple environments with different output paths |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…overrides The inline-chunk plugin previously shared a single `inlinedAssets` Set across all environments, causing assets to be overridden in multi-compiler scenarios. Changes: - Replace single Set with Map<environmentName, Set> for environment isolation - Add getInlinedAssetsSet helper to manage per-environment asset sets - Update all functions to accept environment-specific inlinedAssets parameter - Add asset existence check before processing - Add E2E test for multi-environment inlining Fixes: inline-chunk plugin should separate multiCompiler by environment
4786ab7 to
f8ba818
Compare
9aoy
approved these changes
Jan 5, 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
The inline-chunk plugin previously shared a single
inlinedAssetsSet across all environments, causing assets to be overridden in multi-compiler scenarios.Changes:
Fixes: inline-chunk plugin should separate multiCompiler by environment
Related Links
Checklist