-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
[Bug]: Storybook doesn't run with tailwindcss in next.js #26869
Comments
I have the same problem. A workaround to fix it is change the extensions of files
Why it works?Under the hood,
The file |
Wow, thank you so much! I think it would have been better if it was documented somewhere. Maintainers, please let us know if pull requests are welcomed :) |
Thank you very much for the solution @drianoaz Note for others - I only had to change the postcss config to |
Thank you! I just spent several hours trying to get tailwind to work in storybook. This did the trick.
I think this framework needs an update ASAP to make this change, as the default install is completely broken without it.
|
If you are just finding this issue, do just this and it will work. A couple of hours wasted looking around until I found this lol |
Hello everyone, The above solution is not working for me as I am using nextjs is there any other solution?? Thanks! |
In addition to doing the following:
You need to change
|
Thanks @nady90, it's working now. The issue was that I had |
thank you so much! I was wondering why it wasn't working for my new nextjs project when the other projects were working fine. new storybook peeps are prolly pulling there hair out rn |
As it stands a clean install of Next.js and Storybook results in Tailwind not working in the Storybook. The fix outline in this thread is a good workaround, but please:
Thanks! |
Thank you @nady90, this was driving me crazy, your workaround works for me with Storybook 8.0.9 and Next 14.2.3 🎉 |
I spent the whole day trying different ways to setup storybook in my new NextJS project using Tailwind. This workaround really made it work: |
#26707 should have fixed this issue. Can someone please upgrade to Storybook v8.1 and see if the issue is fixed?
|
@valentinpalkovic I have just updated |
Describe the bug
Describe the bug
yarn dev
but not to the stories when I runyarn storybook
.Storybook picks up tailwindcss in these cases.
postcss.config.js
in the project(root directory)postcss.config.mjs
andpostcss.config.js
in the project(root directory)Storybook doesn't pick up tailwindcss in this case.
postcss.config.mjs
in the projectTo Reproduce
You can clone this repo and run yarn storybook
Make sure to remove
postcss.cofnig.mjs
to see the failure.https://github.com/algoORgoal/bug-storybook-tailwindcss
System
Additional context
"postcss": "8.4.38",
"storybook": "8.0.8",
"tailwindcss": "3.4.1",
"next": "14.2.1",
The text was updated successfully, but these errors were encountered: