-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Description
What version of Tailwind CSS are you using?
For example: v4.1.3
What build tool (or framework if it abstracts the build tool) are you using?
nuxt
:3.16.2
vite
:6.2.6
- daisyui:
5.0.18
- tailwindcss:
4.1.3
- @tailwindcss/vite:
4.1.3
What version of Node.js are you using?
- Node:
20
- Bun:
1.2.9
What browser are you using?
Chrome
What operating system are you using?
macOS
Reproduction URL
Related repository:
https://github.com/serhii-chernenko/daisyui-issue
- Correct styles with the Nuxt 3 single application: https://daisyui-issue-ui-playground.pages.dev
- Broken styles with the latest versions and Nuxt 3 layers architecture: https://daisyui-issue.pages.dev
- Fixed styles after downgrading packages such as
tailwindcss
and@tailwindcss/vite
to the version4.0.3
Describe your issue
In combination of Nuxt 3 Layers architecture, DaisyUI library, and upgrading Tailwind CSS I have the issue described below.
I also created the same issue to the DaisyUI and Nuxt repos:
- bug: latest
tailwindcss
and@tailwindcss/vite
packages don't compile DaisyUI styles in Nuxt 3 Layers architecture saadeghi/daisyui#3775 - Latest
tailwindcss
and@tailwindcss/vite
packages don't compile DaisyUI styles in Nuxt 3 Layers architecture nuxt/nuxt#31773
But honestly, I'm not sure to which one it's really related. It'd be nice to involve Tailwind, Nuxt, Vite, and Daisy together, to find a root cause of this.
Steps to reproduce
Clone repo and install packages
git clone [email protected]:serhii-chernenko/daisyui-issue.git
bun install
Verify the installed versions related to tailwind
bun pm ls --all | grep tailwindcss
├── ...
├── @tailwindcss/[email protected]
├── [email protected]
Run a single Nuxt 3 application
cd src/layers/ui
bun run dev
Expected result (buttons do nothing, it's just UI):
Deployed version is available here:
https://daisyui-issue-ui-playground.pages.dev
Run the end application in Nuxt 3 Layers architecture
cd ../../../
bun run build:app # it's necessary to generate the `wrangler.json` file
bun run dev:app
Expected result (DaisyUI styles completely broken but Tailwind's styles work as expected):
Deployed version is available here:
https://daisyui-issue.pages.dev
Downgrade tailwindcss
and @tailwindcss/vite
to 4.0.3
Add to the root package.json
file the next content:
"overrides": {
"@tailwindcss/vite": "4.0.3",
"tailwindcss": "4.0.3"
}
Or just switch to the branch:
git checkout fix/downgraded-tailwind-and-tailwind-vite-versions
PR is available here:
serhii-chernenko/daisyui-issue#1
Reinstall packages:
bun install
Verify packages again:
bun pm ls --all | grep tailwindcss
├── ...
├── @tailwindcss/[email protected]
├── [email protected]
Run the end application in Nuxt 3 Layers architecture again
bun run build:app # it's necessary to generate the `wrangler.json` file
bun run dev:app
Expected result (DaisyUI styles work as expected):
Deployed version is available here:
https://preview.daisyui-issue.pages.dev