Skip to content
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: menu break in NextJs production build #2303

Closed
technophile-04 opened this issue Aug 29, 2023 · 4 comments
Closed

bug: menu break in NextJs production build #2303

technophile-04 opened this issue Aug 29, 2023 · 4 comments

Comments

@technophile-04
Copy link

What version of daisyUI are you using?

^3.0.2

Describe your issue

Description :

When running locally menu link item has the following CSS rules applied :
Screenshot 2023-08-29 at 2 21 10 AM

But when once you build and serve it the above CSS rules are not added to menu link item

Reproduction steps :

  1. Open https://stackblitz.com/edit/daisyui-nextjs-lzc8vy : This is minimal reproduction repo forked from daisyUI nextjs template and I have just copied menu with icons & badge

  2. Terminate process in terminal and build the app -> npm run build

  3. Serve the exported build -> npm run start

You will the menu item are broken vertical instead of being horizontal :

Screenshot 2023-08-29 at 11 50 37 AM

Notes :

This also breaks in Next version ^13.1.5 here is the repo link to test it out : https://github.com/scaffold-eth/scaffold-eth-2

Some references discussion :

1 . #2272

2 . #2183

What browsers are you seeing the problem on?

All browsers

Reproduction URL

https://stackblitz.com/edit/daisyui-nextjs-lzc8vy

@saadeghi
Copy link
Owner

Update Next.js to the latest version.
It was a CSS processing bug in Next.js but it's fixed now.

@wuarmin
Copy link

wuarmin commented Oct 16, 2023

@saadeghi I have a similar issue in a create-react-app production build:

Menu in dev:
image

Menu in prod:
image

What can I do?
Thanks!

@saadeghi
Copy link
Owner

@wuarmin can you update all the dependencies (especially the ones about build tool or CSS processing)?
Because it's not an issue from daisyUI, it was a bug from CSS build tool which must be fixed by the latest version.

If it didn't help, please share a reproduction repo.

@wuarmin
Copy link

wuarmin commented Oct 16, 2023

@saadeghi Thanks! An upgrade helped. I don't know which package caused the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants