-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tailwindcss does not support css file in monorepo packages #8794
Comments
Hey, appreciate you opening the issue. I poked around the reproduction and Tailwind CSS wasn't being called for the The PostCSS config file is inside I believe you have two options to work around this issue:
Hope that helps! |
I know this isn't directly related to the issue you're having but since this is the first Google search result for "Tailwind Monorepo" I thought I'd share how I fixed my issue here. In my case I just had to add the shared component package to the "content" property in module.exports = {
content: [
//...
'../web-shared/**/*.{js,ts,jsx,tsx}',
],
} Here, my shared component folder is named |
Was this ever fixed?? Resolution is unclear @thecrypticace |
@artemis-prime this wasn't an issue with Tailwind but with postcss and the project setup. If you have a repo you want me to look at I can some time later this week. |
Oh wow, thanks for this answer. Lost a lot of hours over this issue so I wished I could've found this sooner. The strange thing is that this only happens with Storybook, but not Next.js. With Storybook, I had to add a |
What version of Tailwind CSS are you using?
latest v3.1.4.
What build tool (or framework if it abstracts the build tool) are you using?
webpack 5.73.0
What version of Node.js are you using?
v16.13.0
What browser are you using?
Chrome
What operating system are you using?
macOS
Reproduction URL
https://github.com/anilpixel/tailwind-monorepo-css-bug
Describe your issue
The css file is in a scoped package and is not transformed correctly.
I created some css files in scoped packages and configured my
tailwind.config.js
follow issue content - supports scoped packages path? #6889 :packages/components/src/component.css
was:and
packages/components/src/component.tsx
was:The classes in the "tsx" file work fine, but the "component.css " does not, like it is not in the dependency. Here is the screenshot:
I've provided a minimal implementation that can be reproduced, please start
webpack
inapps/demo
withnpm run start
to debug.The text was updated successfully, but these errors were encountered: