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] - tailwind styles aren't working in nextjs standalone build #3415

Open
Raghava-Ch opened this issue Jul 5, 2024 · 5 comments
Open

Comments

@Raghava-Ch
Copy link

Raghava-Ch commented Jul 5, 2024

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

Copy link

linear bot commented Jul 5, 2024

@wingkwong
Copy link
Member

Have you setup tailwindcss ?

@Raghava-Ch
Copy link
Author

Have you setup tailwindcss ?

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

@dendenmushy
Copy link

Have you added your .npmrc on the build phase ?

@Dinista
Copy link

Dinista commented Aug 28, 2024

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

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

4 participants