Next.js Discord

Discord Forum

Weird styling issue with Tailwind in production

Answered
Brown bear posted this in #help-forum
Open in Discord
Brown bearOP
I am building a Next 12 app using Tailwind and DaisyUI and have a navbar. I have noticed that when I run next dev it appears correctly but upon building and running it for production, the styling get mangled specifically for certain styles, especially for the 'menu' class in daisyUI whose styles get completely mangled. Attached are what my styles look like on my dev vs production build. I believe this to be some issue either with the tailwind compilation or something to do with how webpack bundles the css specifically with nested :not selectors as those are the styles that seem to be missing. I wanted to know what I should about this if anyone had any advice or fixes.
Answered by Brown bear
Not sure what I did wrong but upgraded to next 13 and the styles were bundled correctly
View full answer

1 Reply

Brown bearOP
Not sure what I did wrong but upgraded to next 13 and the styles were bundled correctly
Answer