-
Notifications
You must be signed in to change notification settings - Fork 183
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
app/utils
is missing from generated content array in Nuxt 4 setup
#955
Comments
Hm... it should be there as part of https://github.com/nuxt-modules/tailwindcss/blob/main/src/internal-context/load.ts#L70 |
It should be. It's the first time that I am seeing this behaviour and I have use it with several Nuxt 4 apps. This is what I see in the generated file // generated by the @nuxtjs/tailwindcss <https://github.com/nuxt-modules/tailwindcss> module at 2/11/2025, 5:34:55 AM
import configMerger from "@nuxtjs/tailwindcss/merger";
import cfg2 from "./../../tailwind.config.js";
const config = [
{"content":{"files":["/PATH_TO_APP/app/components/**/*.{vue,js,jsx,mjs,ts,tsx}","/PATH_TO_APP/app/components/global/**/*.{vue,js,jsx,mjs,ts,tsx}","/PATH_TO_APP/app/components/**/*.{vue,js,jsx,mjs,ts,tsx}","/PATH_TO_APP/app/layouts/**/*.{vue,js,jsx,mjs,ts,tsx}","/PATH_TO_APP/app/pages/**/*.{vue,js,jsx,mjs,ts,tsx}","/PATH_TO_APP/app/plugins/**/*.{js,ts,mjs}","/PATH_TO_APP/composables/**/*.{js,ts,mjs}","/PATH_TO_APP/utils/**/*.{js,ts,mjs}","/PATH_TO_APP/app/{A,a}pp.{vue,js,jsx,mjs,ts,tsx}","/PATH_TO_APP/app/{E,e}rror.{vue,js,jsx,mjs,ts,tsx}","/PATH_TO_APP/app/app.config.{js,ts,mjs}"]}},
{},
cfg2
].reduce((acc, curr) => configMerger(acc, curr), {});
const resolvedConfig = config;
export default resolvedConfig; This one right here: |
Based on the line of code you linked, I am assuming Nuxt is not generating the paths propely? But I am able to auto import stuff from the utils folder.. i don't know what's going on |
Sorry, I see that composables is not pointing to app/ either.. I see based on next line: https://github.com/nuxt-modules/tailwindcss/blob/main/src/internal-context/load.ts#L71 there may have been a conflict. Will fix this in next patch 🙏 |
Sounds good. TY |
Environment
Darwin
v20.18.1
3.15.4
3.21.1
2.10.4
[email protected]
-
compatibilityDate
,devtools
,future
,experimental
,$production
,modules
,tailwindcss
,colorMode
,imports
,app
@nuxtjs/[email protected]
,@nuxtjs/[email protected]
,@vueuse/[email protected]
,@nuxt/[email protected]
,@nuxt/[email protected]
,@pinia/[email protected]
-
Reproduction
No response
Describe the bug
After setting
future: { compatibilityVersion: 4 }
in thenuxt.config
file, and then run npm run dev, the generated config file inside.nuxt/tailwind/postcss.mjs
is missing the path forapp/utils/**/*.{js,ts,mjs}
It only has
utils/**/*.{js,ts,mjs}
After setting
app/utils/**/*.{js,ts,mjs}
in thetailwind.config
the styles from the utils folder started showing again.Additional context
No response
Logs
The text was updated successfully, but these errors were encountered: