-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Bug
Copy link
Labels
Description
Environment
- Operating System: Linux
- Node Version: v20.9.0
- Nuxt Version: 3.17.5
- CLI Version: 3.25.1
- Nitro Version: 2.11.11
- Package Manager: pnpm@8.10.2
- Builder: -
- User Config: compatibilityDate, devtools, vite
- Runtime Modules: -
- Build Modules: -
Reproduction
Reproduction: https://codesandbox.io/p/devbox/romantic-stonebraker-w4cjhm?workspaceId=ws_L5VBxQpoiNBY27P4qyDsek
Describe the bug
When running nuxt dev
, the AutoImport feature fails to work correctly. The console displays errors indicating that built-in components (e.g., NuxtWelcome
) fail to be processed properly.
Steps to Reproduce
- Set
vite.esbuild.minifyWhitespace = true
innuxt.config.ts
- Add an empty
<script setup lang="ts"></script>
block in any.vue
SFC (Single File Component)
<template>
<div>
<NuxtRouteAnnouncer />
<NuxtWelcome />
</div>
</template>
<script setup lang="ts">
console.log("111");
</script>
Expected Behavior
Built-in components should be auto-imported without errors during development.
Actual Behavior
Console errors occur for built-in components (e.g., NuxtWelcome
), and auto-importing fails.
Additional context
No response
Logs
WARN [Vue warn]: Failed to resolve component: NuxtRouteAnnouncer
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.
at <App>
at <NuxtRoot>
this is setup