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.
Ember Fastboot is deliberately designed to be able to run the same build output that was produced for the browser in Node, without an entire second build for this second environment.
In order to fit in with that architecture, Embroider preloads all lazy chunks in fastboot, so that we never hit webpack's runtime loader (which will expect to be running in the browser and break in fastboot).
Previously, the way we identified the lazy chunks was simply by listing all the chunks and seeing which ones were not used as entry chunks for any entrypoint. But this was incorrect.
A chunk could be used lazily by one entrypoint (like the app) while being used eagerly by another (like the test suite). In this case we would miss preloading it and get a runtime error.
This changes the chunk categorization strategy to track the lazy chunks per-entrypoint.