-
Notifications
You must be signed in to change notification settings - Fork 939
Description
Environment
- Operating System: Darwin
- Node Version: v22.15.0
- Nuxt Version: 4.2.0
- CLI Version: 3.29.3
- Nitro Version: 2.12.8
- Package Manager: pnpm@10.13.1
- Builder: -
- User Config: extends, modules, alias, imports, components, ui, runtimeConfig, nitro, $production, routeRules, app, css, sitemap
- Runtime Modules: -
- Build Modules: -
Is this bug related to Nuxt or Vue?
Nuxt
Package
v4.x
Version
4.1.0
Reproduction
If necessary i can create a reproduction, but due to the nature of this bug that would require some effort. That being said, im happy to do it if necessary
Description
experimental.componentDetection is enabled, it only scans the source code. When working with packaged Nuxt layers (and probably modules) that include NuxtUI, it fails to detect the components used exclusively in those remote source. Hence the css from those components is tree shaken.
I have a base layer that contains common configuration and shared UI between projects. This layer is published as a private npm packages.
I guess the same issue applies to using layers from a remote gh repo with c12.
Maybe the componentDetection config should be extended with an options for which dirs to scan? that way we can add code from within the node_modules
Additional context
No response