I'm currently using Tailwind v3 in my Angular project (https://github.com/edissyum/opencapture/tree/dev_nch).
Today I tried to upgrade to Tailwind v4, but without success.
I didn't use PostCSS, I just have Tailwind in my package.json, my tailwind.config.js and the @tailwind base import in my main scss file.
If I upgrade the package to 4.0.0, I have the following error:
Error: It looks like you're trying to use
tailwindcssdirectly as a PostCSS plugin. The PostCSS plugin has moved to a separate package, so to continue using Tailwind CSS with PostCSS you'll need to install@tailwindcss/postcssand update your PostCSS configuration.
I try to install @tailwind/postcss and create a PostCSS config file like this:
export default {
plugins: {
"@tailwindcss/postcss": {}
}
}
Removed @tailwind directives
In v4 you import Tailwind using a regular CSS
@importstatement, not using the@tailwinddirectives you used in v3:Not supported from v4
@tailwind base; @tailwind components; @tailwind utilities;Supported from v4
@import "tailwindcss";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With