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

FOUC (Flash of Unstyled Content ) when using vite-ssg + tailwind #372

Open
armenr opened this issue Sep 11, 2023 · 0 comments
Open

FOUC (Flash of Unstyled Content ) when using vite-ssg + tailwind #372

armenr opened this issue Sep 11, 2023 · 0 comments

Comments

@armenr
Copy link

armenr commented Sep 11, 2023

Describe the bug

When building my project using vite-ssg + tailwind, we consistently get FOUC on every load.

I have checked whether the same FOUC issue exists with the vanilla vitesse boilerplate, with the default code, and it does.

git clone git@github.com:antfu/vitesse.git \
  && cd vitesse \
  && pnpm i \
  && pnpm build:ssg \
  && pnpm preview

NOTE: Our base project is based on vitesse. We removed unocss and added tailwind.

Reproduction

https://github.com/antfu/vitesse

System Info

❯ npx envinfo --system --binaries --browsers
  System:
    OS: macOS 13.4.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 933.11 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.16.1 - ~/.nvm/versions/node/v18.16.1/bin/node
    npm: 9.5.1 - ~/.nvm/versions/node/v18.16.1/bin/npm
  Browsers:
    Chrome: 116.0.5845.179
    Edge: 113.0.1774.57
    Firefox: 117.0
    Safari: 16.5.2


### Used Package Manager

pnpm

### Validations

- [X] Follow our [Code of Conduct](https://github.com/antfu/.github/blob/main/CODE_OF_CONDUCT.md)
- [X] Read the [Contributing Guide](https://github.com/antfu/contribute).
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
- [X] The provided reproduction is a [minimal reproducible](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant