I have updated Tailwind V2 to Tailwind V3 in my Sage 9 project by following Tailwind's upgrade guide. When I add a class to my blade file, the new engine doesn't generate the required classes in the css. The only way I seem to get it to generate the classes is by updating (saving a change) mytailwind.config.js. This happens when I use either theyarn buildoryarn startcommands.
Usingbg-blue text-primaryas an example; the text colour works, but the background doesn't. Then if I add some slash comments to mytailwind.config.jsfile, save it and runyarn buildthen, behold a blue background with red text.
I had to downgrade autoprefixer to v 9.0.0 because of this error:Module build failed: Error: PostCSS plugin autoprefixer requires PostCSS 8.so I don't know whether or not this affects it's ability to generate the classes.
Tailwind v3 classes not compiling in Sage 9 (Wordpress) after upgrading from Tailwind v2
in General
Posted
I have updated Tailwind V2 to Tailwind V3 in my Sage 9 project by following Tailwind's upgrade guide. When I add a class to my blade file, the new engine doesn't generate the required classes in the css. The only way I seem to get it to generate the classes is by updating (saving a change) my
tailwind.config.js
. This happens when I use either theyarn build
oryarn start
commands.Using
bg-blue text-primary
as an example; the text colour works, but the background doesn't. Then if I add some slash comments to mytailwind.config.js
file, save it and runyarn build
then, behold a blue background with red text.I had to downgrade autoprefixer to v 9.0.0 because of this error:
Module build failed: Error: PostCSS plugin autoprefixer requires PostCSS 8.
so I don't know whether or not this affects it's ability to generate the classes.dependencies:
Tailwind.config.js:
I also check this but can't find my answer: npx -https://stackoverflow.com/questions/71327552/tailwind-css-jit-or-v3-0-is-not-working-basic-installation-not-workingdeoland