-
Notifications
You must be signed in to change notification settings - Fork 142
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 lazy css support #1140
Conversation
So that we can use process.env.EMBROIDER_TEST_SETUP_OPTIONS to configure the apps.
This achieves correctness by avoiding use of the MiniCssExtractPlugin runtime inside fastboot. Right now It works by making all the lazy CSS eager. This is strictly better than being broken. Further work can follow to make the lazy chunks actually lazy in fastboot, such that we detect during rendering which ones were wanted and only insert link tags for those ones.
This was here to try to make each filter match an exact module name, but that apparently causes their child modules not to run.
This is working as intended, but the test failures are places where we already had tests for lazy CSS in engines that have now been forced to be eager. Next step it to investigate how those were ever working -- it's possible they weren't and the tests simply didn't hit the bad cases. |
They only work without fastboot. They never really worked with fastboot, but we were not running them properly in CI.
I confirmed that the lazy engines CSS case was actually broken all along in fastboot, and the test wasn't running properly in CI before. So I'm adjusting the tests to guard that case and only assert that lazy engine CSS is lazy in non-fastboot apps. |
This fixes a crash that can occur if an app tries to lazily load CSS in fastboot.
This change works by making all the lazy CSS eager. This is strictly better than being broken. Further work can follow to make the lazy chunks actually lazy in fastboot, such that we detect during rendering which ones were wanted and only insert link tags for those ones.
Apps that don't use fastboot should be unaffected.