You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: @plugin "daisyui" resolves to daisyui.css instead of index.js on Vite 8 with Node 25 #4503
I'm encountering a build failure when using daisyUI with Tailwind CSS 4 and Vite. It appears that @plugin "daisyui" resolves to daisyui.css instead of index.js, causing the build to fail.
After forcing the plugin to load from index.js, the build completes successfully.
Additional Notes:
This may be related to Node 25 behavior, since Node 25 is newer than commonly used LTS versions.
All dependencies were freshly installed and caches cleared.
No direct @import "daisyui.css" statements exist in the project.
Question:
Is this expected behavior with the current package exports setup, or should @plugin "daisyui" always resolve to index.js regardless of the browser field?
Reacted by Benoît Blanchon, Bob McGinley, Andriy Kovalchuk and Richie-Jang
Thank you @emmontenegro
for reporting issues. It helps daisyUI a lot 💚
I'll be working on issues one by one. I will help with this one as soon as a I
find a solution.
In the meantime providing more details and reproduction links would be
helpful.
I would suggest staying on the previous version of Tailwind CSS until this gets fixed. 4.2.2 must be fine. Apparently the issue started with Tailwind CSS 4.2.3 yesterday.
Activity
github-actions commentedon Apr 21, 2026
Thank you @emmontenegro for reporting issues. It helps daisyUI a lot 💚
I'll be working on issues one by one. I will help with this one as soon as a I find a solution.
In the meantime providing more details and reproduction links would be helpful.
pdanpdan commentedon Apr 21, 2026
Are you using tailwind vite 4.2.3?
If you are then it has nothing to do with node version
tailwindlabs/tailwindcss#19946
emmontenegro commentedon Apr 21, 2026
Thanks for pointing that out.
Just checked, and seems similar. The pckage-name resolution is the part failing I guess.
saadeghi commentedon Apr 21, 2026
Can you confirm that the issue is fixed in Tailwind CSS 4.2.4?
cernyjakub commentedon Apr 22, 2026
I am still getting this error with Tailwind 4.2.4
saadeghi commentedon Apr 22, 2026
I would suggest staying on the previous version of Tailwind CSS until this gets fixed. 4.2.2 must be fine. Apparently the issue started with Tailwind CSS 4.2.3 yesterday.
cernyjakub commentedon Apr 22, 2026
Yes, 4.2.2 works OK.
miguelmagueijo commentedon Apr 24, 2026
4.2.2 doesn't work, see #4510
saadeghi commentedon Apr 24, 2026
@miguelmagueijo Try #4505 (comment)
Also, this is expected to be fixed in the next Tailwind CSS release. The PR is merged.
pdanpdan commentedon Apr 24, 2026
Yes, it works. In your package.json you have
"@tailwindcss/vite": "^4.2.2"that means most recent 4 version, and that is 4.2.4manishambre5 commentedon Apr 24, 2026
I am using
"@tailwindcss/vite": "^4.2.4"and switching to@import "daisyui/daisyui.css";from@plugin "daisyui";works.bturski commentedon Apr 25, 2026
@manishambre5 - I needed to change
@pluginto referenceindex.js:to
Changed @tailwindcss/vite to ^4.2.4 and made plugin usage changes: sa…
style(frontend): tune daisyUI theme accent color and fix Tailwind v4 …