Closed msmiller closed 2 years ago
It sounds like this is expected of postcss-import as it's adhering the spec strictly.
The Tailwind docs cover this exact issue and provide a solution which basically swaps the @tailwind declarations for @imports.
Documented the this question as part of the FAQ: 2a17da2.
The base installation for using the Tailwind builder works OK until you start trying to
@import
other CSS. Without imports that can be piped through@apply
it's tough to compartmentalize your CSS. To get around this:--postcss
to thebuild:css
directive in package.json:Notes: There may be a better way to do this, but this is what I arrived at to get it working. It's a little inconvenient having to manually list imports, but it works. This uses the standard Tailwind PostCSS configs. The Tailwind builder traverses the imports so if you change "foobar.css" it'll trigger a rebuild. The repo I'm working in is using: