Layers from pnpm workspace not compile
Environment
- Operating System: Linux
- Node Version: v22.14.0
- Nuxt Version: 3.17.5
- CLI Version: 3.25.1
- Nitro Version: 2.11.13
- Package Manager: [email protected]
- Builder: -
- User Config: extends, compatibilityDate, devtools, ssr, modules
- Runtime Modules: @nuxtjs/[email protected]
- Build Modules: -
Reproduction
-
github
Describe the bug
Nuxt layer not compile when extended from pnpm workspace pacakge
home page and layout classes from base layer not compiled (scanned) but classes in /test page compiled.
Additional context
I using same pnpm workspace for my project, i facing same bug while upgrading Nuxt UI to version 3.
Logs
Hello @pi0, is there any misconfiguration in my setup?
Seeing the same thing using the new Nuxt4 directory structure and compatibility mode 4.
Any tailwind classes inside /layers are not compiled.
Hello, is there any misconfiguration in my setup?
Hey - I'll triage your issue; just remind me if I don't get back to you by Friday.
Hi @ineshbose , any update?
Thanks for the ping and sorry for the delay.
I see what is causing the issue.. the module is detecting base/assets/css/main.css that is importing tailwindcss so it is thinking that you are manually handling importing of tailwind (this happens over nuxt.config defu'd with layer config, but it also shouldn't be a problem..).
Give a minute, I'm trying to figure out what could be the fix here (we generate sources.css but the import doesn't seem to be working either)
Hi. I think, I have similar problem https://github.com/nuxt-modules/tailwindcss/issues/1012
This works for me:
tailwindcss: {
cssPath: '~/assets/css/tailwind.css'
},
Hi @dongnaebi , i tested this config on https://github.com/aminmokhtari94/nuxt-tailwind-bug-reproduce but not working, can describe how to do it?
Hi @dongnaebi , i tested this config on https://github.com/aminmokhtari94/nuxt-tailwind-bug-reproduce but not working, can describe how to do it?
I later found out that only part of it is usable, and now I’m also waiting for this issue to be resolved.
Also experienced this issue after upgrading from Nuxt 3 (w/ future compatabilityVersion defined) to Nuxt 4.
Explicitly defining the cssPath as @dongnaebi pointed out is a valid workaround.
In my case, seems like the default path value stopped working as expected https://tailwindcss.nuxtjs.org/getting-started/module-options#csspath