nextui-org / nextui

🚀 Beautiful, fast and modern React UI library.
https://nextui.org
MIT License
21.5k stars 1.4k forks source link

[BUG] - tailwind styles aren't working in nextjs standalone build #3415

Open Raghava-Ch opened 2 months ago

Raghava-Ch commented 2 months ago

NextUI Version

2.**

Describe the bug

In simple terms the project just created using nextui init my_app built in standalone mode, bun .next/standalone/server.js - no styles applied. bun run start - working as expected.

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

  1. create new application nextui init my_app
  2. change output mode to standalone in next.config.js output: 'standalone'
  3. build the application bun run build
  4. run the application using bun .next/standalone/server.js
  5. finally observe the web app in browser, in my case safari

Expected behavior

tailwind styles should show up in the web page built in standalone mode.

Screenshots or Videos

No response

Operating System Version

macOS Sonoma 14.5 - intel silicon

Browser

Safari

linear[bot] commented 2 months ago

ENG-1110 [BUG] - tailwind styles aren't working in nextjs standalone build

wingkwong commented 2 months ago

Have you setup tailwindcss ?

Raghava-Ch commented 2 months ago

Have you setup tailwindcss ?

Yes, Styles are working as expected when run with dev or start. Problem with only standalone build.

dendenmushy commented 2 months ago

Have you added your .npmrc on the build phase ?

Dinista commented 3 weeks ago

The 'standalone' build doesn't copy the .next/static folder by default. Try copying it to .next/standalone/.next and see if it works.