-
-
Notifications
You must be signed in to change notification settings - Fork 84
fix: resolve module content duplication when module appears in multiple chunks #1367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for rsdoctor ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
7da099f to
c6128ba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes module content duplication when a module appears in multiple chunks by changing the sourcemap storage structure from concatenating all code segments to storing them separately per chunk.
Key Changes:
- Modified
sourceMapSetsdata structure to use nested Maps (module → chunk → content) instead of concatenating content - Added
chunkNameparameter tocollectSourceMapsfunction to track which chunk each code segment belongs to - Added validation to warn when chunk name is not provided
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
7b46e95 to
ec8d9d2
Compare
Summary
fix: resolve module content duplication when module appears in multiple chunks
When a module is bundled by multiple chunks, the module content in sourceMapSets will be concatenated multiple times with the module codes, resulting in inaccurate module size.
Related Links