Tailwind working in NextJS with `pnpm build && pnpm start` but not when deploying

Set my project’s build to pnpm build and my project’s install to pnpm install in Vercel. Checking the build logs I see it using pnpm build and pnpm install. Running pnpm build && pnpm start locally the tailwind styling is there and looks great. When deployed the tailwind classes are on the HTML elements, but there isn’t any tailwind styling – at all.

NextJS 15
Tailwind
Vercel

l
Additionally, we can see that the globals.css is being served with:

@tailwind base;@tailwind components;@tailwind utilities;body,html {
    margin: 0;
    padding: 0
}

Hey @lcpichette. I wasn’t able to replicate the issue with a test app. Tailwind worked as expected when I deployed a new project based on the Portfolio Blog Starter repo.

I’ve seen similar issues in the past with different configuration options, particularly around optimization. In addition to checking the Tailwind docs for recommendations, these example repos can be helpful as a reference.

If you want more specific suggestions, please share a minimal reproducible example or your public repo here. Or use v0 to get suggestions relevant to your app setup.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.