-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
chore: add source() to Tailwind v4 imports to ensure consistent hashing
#6459
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
Conversation
Tailwind CSS v4's `@import` directive needs an explicit `source()` path to ensure consistent CSS asset hashing between client and server builds. Without this, builds can result in the server-rendered page referencing an nonexistent CSS asset, resulting in a 404 (which may manifest in browser devtools as a CORS error). You can see an example here (open devtools to see error): https://69725dbd6dcf150f9fbaeb37--vermillion-brigadeiros-35570b.netlify.app/ (source: https://github.com/serhalp/demo-tanstack-start-20160121). This updates all examples, e2e fixtures, and documentation to use: ``` @import 'tailwindcss' source('../'); ``` Fixes TanStack#4959. Supersedes TanStack#4606. --- Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Important Review skippedToo many files! 43 files out of 193 files are above the max files limit of 150. You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
View your CI Pipeline Execution ↗ for commit 474b2ef
☁️ Nx Cloud last updated this comment at |
source() to Tailwind v4 imports to ensure consistent hashingsource() to Tailwind v4 imports to ensure consistent hashing
Tailwind CSS v4's
@importdirective needs an explicitsource()path to ensure consistent CSS asset hashing between client and server builds. Without this, builds can result in the server-rendered page referencing an nonexistent CSS asset, resulting in a 404 (which may manifest in browser devtools as a CORS error).You can see an example here (open devtools to see error): https://69725dbd6dcf150f9fbaeb37--vermillion-brigadeiros-35570b.netlify.app/ (source: https://github.com/serhalp/demo-tanstack-start-20160121).
This updates all examples, e2e fixtures, and documentation to use:
Fixes #4959.
Supersedes #4606.
(I haven't confirmed but I suspect this was introduced in #5580.)