I have an issue with my universal app, where when the server side app is swapped for the client side app, there is a moment when there is no styling for the components which are part of my routed component for that page. This results in the page loading correctly, then momentarily displaying a flash of unstyled content (FOUC) and looking horrible, before sorting itself out.
The styling for my website header and footer components look fine the whole time, but the components that load inside the <router-outlet> element are the ones that do not have the correct styling.
I am using Preboot to manage the server > client transition and not doing anything outside of the standard configuration. I have experimented using @ngx-universal/state-transfer and @ngx-cache libraries, but I don't think they are what I need.
I am using lazy loaded routes, but I have experimented with removing these and the error is the same. I have also tried setting { initialNavigation: 'enabled' } in my routing config.
I use webpack to build my server side app, and the Angular CLI for the client side one, mostly based on this project, and I use the AOT compiler. Any ideas would be very appreciated, thanks!