Skip to content

Consider app.bodyAttrs.class from nuxt.config in scanning #1011

@pedantic-git

Description

@pedantic-git

Environment

------------------------------
- Operating System: Linux
- Node Version:     v20.18.0
- Nuxt Version:     4.0.0
- CLI Version:      3.26.2
- Nitro Version:    2.12.3
- Package Manager:  bun@1.2.18
- Builder:          -
- User Config:      modules, imports, devtools, app, css, content, experimental, compatibilityDate, nitro, eslint, pwa
- Runtime Modules:  @nuxt/content@3.6.3, @nuxt/eslint@1.6.0, @nuxt/icon@1.15.0, @nuxt/scripts@0.11.10, @nuxt/test-utils/module@3.19.2, @nuxt/ui@3.2.0, @pinia/nuxt@0.11.2, pinia-plugin-persistedstate/nuxt@4.4.1, nitro-cloudflare-dev@0.2.2, @vite-pwa/nuxt@1.0.4
- Build Modules:    -
------------------------------

Reproduction

No response

Describe the bug

Thanks for this amazing module and the associated @nuxt/ui!

I just upgraded my app to Nuxt v4 and the new directory structure that moves srcDir to app/.

All my Tailwind worked correctly after the move except for classes I'd added to ${rootDir}/nuxt.config.ts (specifically the key app.bodyAttrs.class which is used to add classes to the <body> tag).

I was able to work around this by adding the following line to app/assets/css/main.css:

@source "../../../nuxt.config.ts";

but presumably this might like to be in the default files that are parsed when the new directory structure is used, as it was before?

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions