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

Tailwind: FoUC with unstable_createViteServer and unstable_loadViteServerBuild #8019

Closed
1 task done
manzaloros opened this issue Nov 15, 2023 · 2 comments
Closed
1 task done

Comments

@manzaloros
Copy link

What version of Remix are you using?

2.2.0

Are all your remix dependencies & dev-dependencies using the same version?

  • Yes

Steps to Reproduce

  1. Run npx create-remix@latest --template remix-run/templates/express.

  2. Install Tailwind as per the instructions here.

  3. Use Tailwind to style a div on the existing page. It works correctly, with no flash of unstyled content.

  4. Now, use a custom server as per the instructions on the same page..

  5. Observe that the page will now have a flash of unstyled content.

Expected Behavior

I expect there to be no flash of unstyled content using a custom server with unstable_createViteServer and unstable_loadViteServerBuild just like using Vite out of the box.

Actual Behavior

There is a flash of unstyled content when using a custom server (unstable_createViteServer and unstable_loadViteServerBuild) and the instructions from here.

@kiliman
Copy link
Collaborator

kiliman commented Nov 15, 2023

You're probably getting React hydration errors. I recommend updating to the latest React 18.3 canary versions.

You can see an example repo here:

https://github.com/kiliman/remix-vite-2.2.0

@pcattori
Copy link
Contributor

Duplicate of #7878

@pcattori pcattori marked this as a duplicate of #7878 Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants