Nuxt · NUXT0041

Nested plugins are not auto-registered by default

Flags subdir auto registration assumption in Nuxt plugins code before it leaks into runtime behavior.
NUXT0041vite-doctor/nuxtpluginswarnSuggestion

Run this rule

pnpm nuxt doctor --rules nuxt/plugins/no-subdir-auto-registration-assumption

Why it matters

Vite configuration runs in both dev and build pipelines. Narrow, explicit settings reduce surprises across SSR, workers, and local file access.

Remove subdir auto registration assumption, or move it to the Nuxt runtime/API that owns that behavior.

Example

Register nested plugins explicitly

Before

// app/plugins/nested/analytics.ts
export default defineNuxtPlugin(() => {})

After

export default defineNuxtConfig({
  plugins: ['~/app/plugins/nested/analytics'],
})
Copyright © 2026