Hi, I'm trying to install Tailwind via yarn rw g util tailwind. However, when I run the dev server using yarn rw dev, I immediately see an error message saying:
ValidationError: Invalid options object. PostCSS Loader has been initialized using an options object that does not match the API schema.
- options has an unknown property 'config'. These properties are valid:
object { postcssOptions?, execute?, sourceMap? }
This error even occurs in a new project. It could be just me, but here are the steps that I took:
yarn create redwood-app appcd appyarn rw g util tailwindyarn rw devDoing a little search shows that it could be webpack but I'm not sure.
@iwatakeshi Thanks for reporting this - I'm fixing this now.
@thedavidprice This should go in v0.18.0
Hey @iwatakeshi This fix will be in the next release which will be out shortly.
@peterp Awesome thanks!
I saw the changes in https://github.com/redwoodjs/redwood/blob/7b3a0be4fef6edadd0c09566de6c9f6d2d6bdae2/packages/core/config/webpack.common.js#L68-L75 but noticed that there are two options. I could be wrong but I think there should only be one since I just tried it locally by changing the config file manually and it worked.
@iwatakeshi Whoops, fixed now!
@peterp Can you please take a second look on the fixes here? The tailwind generator (or tailwind for that matter) doesn't seem to work in development.
web | You did not set any plugins, parser, or stringifier. Right now, PostCSS does nothing. Pick plugins for your case on https://www.postcss.parts/ and use them in postcss.config.js.
Tailwind seems completely broken now starting from v0.18. Even a manual install does not work. The generator also generates:
@import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";
When it should be:
@tailwind "tailwindcss/base";
@tailwind "tailwindcss/components";
@tailwind "tailwindcss/utilities";
I provided some info which might help w/ tracing this:
https://github.com/redwoodjs/redwoodjs.com/pull/330#issuecomment-689153466
Willing to help w/ this but wanted to confirm that new projects using tailwind is indeed not working right now. I've tried generating 3 new projects on v0.19 and they're all broken as well. The app may startup, but tailwind styles are not being applied.
I unfortunately confirm: it broke my styling on latest version bump.
Issue might be related to #1170