Styles missing in production after updating Shadcn to Tailwind 4 (Netlify/Vercel) #6635
Unanswered
pedrosorrentino
asked this question in
Q&A
Replies: 3 comments 1 reply
-
@pedrosorrentino I'm seeing the same thing with the same stack. Did you figure this out? |
Beta Was this translation helpful? Give feedback.
0 replies
-
@SwizzleKen @pedrosorrentino i had a similar issue until i added this line YMMV given my stack is different (React/Next/Turborepo/Vercel) |
Beta Was this translation helpful? Give feedback.
1 reply
-
I have not used next.js and I have no more problems :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
After updating Shadcn to work with Tailwind 4, I encountered an issue when deploying my application on Netlify and Vercel.
Initially, with the latest version of lucide-react, the deployment failed. I resolved this by downgrading lucide-react to "0.469.0", which allowed the deployment to succeed.
However, in production (https://expireddomain.site/domains), Shadcn components (e.g., tables) render but appear unstyled. In localhost, everything works as expected.
Steps to reproduce:
Update Shadcn to work with Tailwind 4.
Deploy using the latest version of lucide-react → Deployment fails.
Downgrade lucide-react to "0.469.0" → Deployment succeeds, but styles are missing in production.
In localhost, everything works fine.
Environment:
Framework: Astro
Database: Turso
Deployment Platform: Netlify / Vercel
Relevant Versions (package.json excerpt):
{
"@astrojs/netlify": "^6.1.0",
"@astrojs/react": "^4.2.0",
"@clerk/astro": "^2.1.20",
"@tailwindcss/vite": "^4.0.6",
"@tanstack/react-table": "^8.21.2",
"astro": "^5.2.5",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"tailwindcss": "^4.0.6",
"tailwindcss-animate": "^1.0.7",
"lucide-react": "0.469.0"
}
Possible Causes & Hypotheses:
Could this be related to Tailwind's tree-shaking in production?
Does @tailwindcss/vite require additional configuration for Astro?
Could the issue stem from react@19 compatibility with Shadcn?
Does shadcn/ui require specific configuration adjustments for Tailwind 4?
Expected Behavior:
Shadcn components should display correctly with proper styling in production, just as they do in localhost.
I’d appreciate any guidance on resolving this issue. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions