Skip to content
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

fastboot chunk preloading fix #1109

Merged
merged 1 commit into from Feb 5, 2022
Merged

fastboot chunk preloading fix #1109

merged 1 commit into from Feb 5, 2022

Commits on Feb 5, 2022

  1. fastboot chunk preloading fix

    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.
    ef4 committed Feb 5, 2022
    Configuration menu
    Copy the full SHA
    41fbb44 View commit details
    Browse the repository at this point in the history