-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix hydration mismatch in production builds when using the Tailwind 4 Integration Guide #4606
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
base: main
Are you sure you want to change the base?
Conversation
can you please add some more description about that. what should this point to, a link to the tailwind docs etc. |
View your CI Pipeline Execution ↗ for commit 941ac88
☁️ Nx Cloud last updated this comment at |
More templates
@tanstack/arktype-adapter
@tanstack/directive-functions-plugin
@tanstack/eslint-plugin-router
@tanstack/history
@tanstack/react-router
@tanstack/react-router-devtools
@tanstack/react-router-with-query
@tanstack/react-start
@tanstack/react-start-client
@tanstack/react-start-plugin
@tanstack/react-start-server
@tanstack/router-cli
@tanstack/router-core
@tanstack/router-devtools
@tanstack/router-devtools-core
@tanstack/router-generator
@tanstack/router-plugin
@tanstack/router-utils
@tanstack/router-vite-plugin
@tanstack/server-functions-plugin
@tanstack/solid-router
@tanstack/solid-router-devtools
@tanstack/solid-start
@tanstack/solid-start-client
@tanstack/solid-start-plugin
@tanstack/solid-start-server
@tanstack/start-client-core
@tanstack/start-plugin-core
@tanstack/start-server-core
@tanstack/start-server-functions-client
@tanstack/start-server-functions-fetcher
@tanstack/start-server-functions-server
@tanstack/valibot-adapter
@tanstack/virtual-file-routes
@tanstack/zod-adapter
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please add some more description about that. what should this point to, a link to the tailwind docs etc.
Fix hydration mismatch in production builds when using the Tailwind 4 Integration Guide
Added
source("../")
to the Tailwind import to explicitly set the base path for class detection.Problem
Solution
The
source()
directive tells Tailwind to always scan from../
relative to the CSS file location, regardless of the current working directory during build.What it points to
app/styles/app.css
→app/src/
)References
Without this explicit path, builds from different working directories (CI/CD, Docker, monorepo tools) will produce inconsistent CSS output.
Mentioned in https://discord.com/channels/719702312431386674/1390062434038845521