From TailwindCSS v4, a new CSS-first configuration was introduced, so tailwind.config.js
is no longer needed and can be deleted.
So your new configuration looks something like this: global.css
@import "tailwindcss";
@source ./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue};
@theme {
/* ... */
}
The @config
was created so that anyone migrating from v3 to v4 would have the option to get their app running quickly with minimal changes, but many breaking changes have occurred in the meantime, which you should review:
Other related: