-
Notifications
You must be signed in to change notification settings - Fork 18
Closed
Labels
investigationThis issue needs an investigationThis issue needs an investigation
Description
Expected Behavior
For the entries in "entrypoints" in the asset manifest to also be keys in "origins"
Current Behavior
I have a situation where the above isn't happening.
I think what is happening is that:
- I use react-loadable for a small component.
- I think webpack is seeing enough overlap between my entrypoint and the small component to combine them into one chunk.
- Then when
getChunkOrigin
runs, it finds the import statement for my small component (which is also the entrypoint chunk) and adds an entry into "origins" under/Components/SmallComponent
origins.size
is not 0 and thereforenames[0]
(the name of the entrypoint) is never added as an origin key.- This then causes the entrypoint bundles not to be loaded
Possible Solution
Potentially adding something like this to the end of getChunkOrigin
:
if (this.entrypoints.has(names[0])) {
origins.add(names[0]);
}
I'm working with a very rudimentary understanding of how things work so I don't know if this is the right approach and, if so, whether we also need to check the other entries in names
or against the id
too.
Metadata
Metadata
Assignees
Labels
investigationThis issue needs an investigationThis issue needs an investigation