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
Assign chunk IDs before creating outputBundle chunks #2483
Conversation
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.
Yup, this seems like how it should work!
The CI failure seems to do with the assignment of numbers to named chunks with the same chunk name - I checked it out and it seems fine to update the tests to what is being output, and right as well that the first chunk ( |
Huh, it looks like it's only generating one chunk instead of three in that test? Investigating... |
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.
Looks great.
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.
👍
This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
#2461
Description
The
chunk
object that is passed to therenderChunk
hook (and which forms the properties of the output bundle object) contains, inter alia, animports
array specifying the IDs of the external modules and chunks the chunk depends on.Currently, the loop that assigns the IDs to the chunk is the same as the loop that gets the imported IDs; consequently the imported IDs are frequently
undefined
.This PR separates ID assignation into a separate loop.