Production builds of Next.js do not apply the base Tailwind utilities in the static build if any components in the pages/ directory imports any external TypeScript components (such as components/nav.tsx), the build only apply the styling added into the
yarn create next-app project-namewith-tailwindcss example projectyarn add --dev typescript @types/react @types/nodecomponents/nav.js to components/nav.tsxyarn run build && yarn run starthttp://localhost:3000That it would leverage the base Tailwind CSS utilities and appear as the default rather than the screen shot below.
The base utilities, such as flexbox, are lost. Only the styles using the @apply attribute in styles/index.css are applied.

This doesn't seem to happen if any page components are using TypeScript, only if the components that the page components import are using TypeScript.
Think this is a tailwind bug actually, where it uses PurgeCSS only on .js files 馃 cc @adamwathan
Hey! Make sure you are configuring Tailwind to look through all the relevant files here:
https://github.com/vercel/next.js/blob/canary/examples/with-tailwindcss/tailwind.config.js#L2
The example you started with is only looking for .js files, so you just need to update that array of paths to also make sure it's looking for any other file types that might contain any markup.
Ah, that did it. Feel a little silly for missing that. Thanks for the quick response!
We'll want to update that example to also include .tsx .jsx and .ts
Most helpful comment
Hey! Make sure you are configuring Tailwind to look through all the relevant files here:
https://github.com/vercel/next.js/blob/canary/examples/with-tailwindcss/tailwind.config.js#L2
The example you started with is only looking for
.jsfiles, so you just need to update that array of paths to also make sure it's looking for any other file types that might contain any markup.