Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(rsc): Load all css links to support css with rsc (#10544)
**Problem** Currently we don't have good css support with RSC. Therefore the pages are unstyled and look ugly. **Changes** 1. We parse the build manifests and collect all css assets that could be loaded. We then pass these through to the `Document` component which ultimately causes them to be inserted into the HTML stream as link tags. 2. Removes the vite plugin which used to add `preinit` calls. It's no longer used and can be revived from the git history if needed. **Notes** 1. This link was helpful in confirming that this isn't a crazy road to be going down: https://vitejs.dev/guide/backend-integration.html#backend-integration 3. We can of course optimise in the future. We can go back to trying to get `preinit` working or we can stop loading some of these css assets by determining if they need to be loaded or not based on the url we're responding to. --------- Co-authored-by: Tobbe Lundberg <tobbe@tlundberg.com>
- Loading branch information