After update to 4.0, my setup with webpack no more works #15790
-
|
after receiving error Error: It looks like you're trying to use tailwindcss directly 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/postcss and update your PostCSS configuration. i install @tailwind/postcss changed webpack and postcss. kind all bulilds no errors but styles not apply . tortured GPT no result... module.exports = {
plugins: {
'@tailwindcss/postcss': {}, // Use the main Tailwind CSS package
autoprefixer: {},
},
};
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
|
fixed: need to add @import "tailwindcss"; to my global.css |
Beta Was this translation helpful? Give feedback.
-
|
Solved (at least on Next.js)
Source: |
Beta Was this translation helpful? Give feedback.
-
|
oh thanks. its nice there is upgrade script :) the main diference is in version 3 and in version 4 beside changin plugin '@tailwindcss/postcss' ya need change css !!! |
Beta Was this translation helpful? Give feedback.
In case you want to make a manual fix, here are all the changes that were made automatically:
package.json
"devDependencies": { - "autoprefixer": "^10.4.20", - "tailwindcss": "^3.4.16", + "tailwindcss": "^4.0.0", + "@tailwindcss/postcss": "^4.0.0", }postcss.config.js
module.exports = { plugins: { - tailwindcss: {}, - autoprefixer: {}, + '@tailwindcss/postcss': {}, }, }tailwind.config.js(removed file)globals.css