Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chin2km/linaria-vite-dev-ssr-issue
https://github.com/chin2km/linaria-vite-dev-ssr-issue
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/chin2km/linaria-vite-dev-ssr-issue
- Owner: chin2km
- Created: 2024-04-23T23:55:35.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-04-24T00:20:41.000Z (7 months ago)
- Last Synced: 2024-04-24T01:35:10.671Z (7 months ago)
- Language: JavaScript
- Size: 38.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# linaria vite ssr dev issue
This repo is a reproduction for the issue where Vite in dev mode does not inline the linaria CSS in the server rendered html.
The styles kicks in only after the react hydration and the vite runtime kicks in.This results in a very bad flicker of the UI from a state of no styles to a state where styles are actually loaded.
This becomes a big issue as the project grows, since in big projects the number of files Vite has to request in dev is very high and resulting in a few seconds of styles not being loaded in the server rendered html.
## command
```sh
yarn dev
```## Issues
- https://github.com/callstack/linaria/issues/1404
- https://github.com/Anber/wyw-in-js/issues/78