\nI'd really appreciate it if the team considers a more flexible and intuitive API.\n\n### Additional information\n\n- [ ] Would you be willing to help implement this feature?\n- [ ] Could this feature be implemented as a module?\n\n### Final checks\n\n- [x] Read the [contribution guide](https://nuxt.com/docs/community/contribution).\n- [x] Check existing [discussions](https://github.com/nuxt/nuxt/discussions) and [issues](https://github.com/nuxt/nuxt/issues).",[3042,3045],{"name":3043,"color":3044},"enhancement","8DEF37",{"name":3046,"color":3047},"pending triage","E99695",29275,"Better API for Auto Imports Customization","2024-10-08T08:40:01Z","https://github.com/nuxt/nuxt/issues/29275",0.68192816,{"description":3054,"labels":3055,"number":3065,"owner":3033,"repository":3033,"state":3066,"title":3067,"updated_at":3068,"url":3069,"score":3070},"### Environment\r\n\r\n- Operating System: `Darwin`\r\n- Node Version: `v18.15.0`\r\n- Nuxt Version: `3.5.3`\r\n- Nitro Version: `2.5.0`\r\n- Package Manager: `pnpm@8.6.2`\r\n- Builder: `vite`\r\n- User Config: `devtools`\r\n- Runtime Modules: `-`\r\n- Build Modules: `-`\r\n\r\n\r\n### Reproduction\r\n\r\nThis will result in an error because the type `Ref` is not found in `#imports`.\r\n```js\r\nimport { ref, type Ref } from '#imports'\r\n```\r\n\r\nor is this the correct approach..? (by the way I have set `autoImport: false` in `nuxt.config.ts`)\r\nActually, importing from 'vue' seems clearer to me than importing from '#imports'.\r\n```js\r\nimport { ref, type Ref } from 'vue'\r\n```\r\n\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n_No response_",[3056,3059,3062,3063,3064],{"name":3057,"color":3058},"types","2875C3",{"name":3060,"color":3061},"3.x","29bc7f",{"name":3024,"color":3025},{"name":3027,"color":3028},{"name":3030,"color":3031},21684,"closed","Can't import types like `Ref` from `#imports`","2023-06-26T15:53:31Z","https://github.com/nuxt/nuxt/issues/21684",0.6483195,{"description":3072,"labels":3073,"number":3075,"owner":3033,"repository":3033,"state":3066,"title":3076,"updated_at":3077,"url":3078,"score":3079},"### Environment\n\n\n------------------------------\n- Operating System: Linux\n- Node Version: v20.9.0\n- Nuxt Version: 3.17.5\n- CLI Version: 3.25.1\n- Nitro Version: 2.11.11\n- Package Manager: pnpm@8.10.2\n- Builder: -\n- User Config: compatibilityDate, devtools, vite\n- Runtime Modules: -\n- Build Modules: -\n------------------------------\n\n### Reproduction\n\nReproduction: https://codesandbox.io/p/devbox/romantic-stonebraker-w4cjhm?workspaceId=ws_L5VBxQpoiNBY27P4qyDsek\n\n### Describe the bug\n\nWhen 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.\n\n### Steps to Reproduce\n1. Set `vite.esbuild.minifyWhitespace = true` in `nuxt.config.ts`\n2. Add an empty `\u003Cscript setup lang=\"ts\">\u003C/script>` block in any `.vue` SFC (Single File Component)\n\n``` vue\n\u003Ctemplate>\n \u003Cdiv>\n \u003CNuxtRouteAnnouncer />\n \u003CNuxtWelcome />\n \u003C/div>\n\u003C/template>\n\n\u003Cscript setup lang=\"ts\">\nconsole.log(\"111\");\n\u003C/script>\n```\n\n### Expected Behavior\nBuilt-in components should be auto-imported without errors during development.\n\n### Actual Behavior\nConsole errors occur for built-in components (e.g., `NuxtWelcome`), and auto-importing fails.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell-script\nWARN [Vue warn]: Failed to resolve component: NuxtRouteAnnouncer\nIf this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement. \n at \u003CApp> \n at \u003CNuxtRoot>\n\nthis is setup\n```",[3074],{"name":3030,"color":3031},32290,"[Bug] AutoImport Fails for Components with `vite.esbuild.minifyWhitespace=true` in Dev Mode","2025-06-06T04:42:30Z","https://github.com/nuxt/nuxt/issues/32290",0.64940095,{"description":3081,"labels":3082,"number":3091,"owner":3033,"repository":3033,"state":3066,"title":3092,"updated_at":3093,"url":3094,"score":3095},"### Environment\n\n- Operating System: Windows_NT\n- Node Version: v18.16.0\n- Nuxt Version: 3.4.3\n- Nitro Version: 2.4.0\n- Package Manager: pnpm@8.5.0\n- Builder: vite\n- User Config: experimental, modules, colorMode\n- Runtime Modules: @unocss/nuxt@0.51.12, @vueuse/nuxt@10.1.2, nuxt-icon@0.4.0, nuxt-swiper@1.1.0, @nuxt/devtools@0.4.6, @nuxt/image-edge@1.0.0-28020728.5df24eb, @nuxtjs/color-mode@3.2.0\n- Build Modules: -\n\n### Reproduction\n\n\n\nThis error doesn't seem to be reproducible on Stackblitz so I have included a [github repo](https://github.com/tobychidi/nuxt-utils-import-error)\n\n### Describe the bug\n\nWhen functions are auto-imported from utils/ composables and used in Vue SFC Template, VsCode throws and error. Yes, I use the latest volar. This error appeared after `pnpm up` That bumped my Vue version to 3.3.1.\n\nI have not tried reverting Vue versions though. \n\n### Additional context\n\nExample: \n```\nProperty 'useShowSnack' does not exist on type '{ $: ComponentInternalInstance; $data: {}; $props: { key?: string | number | symbol | undefined; ref?: VNodeRef | undefined; ref_for?: boolean | undefined; ... 8 more ...; style?: unknown; }; ... 10 more ...; $watch\u003CT extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (arg...'.ts(2339)\n```\n\n_No response_\n\n### Logs\n\n_No response_",[3083,3084,3085,3088],{"name":3060,"color":3061},{"name":3021,"color":3022},{"name":3086,"color":3087},"upstream","E8A36D",{"name":3089,"color":3090},"upstream-bug","B60205",20827,"TS Error with auto-imports from composables and utils in Vue Template after 3.3","2024-11-07T20:13:37Z","https://github.com/nuxt/nuxt/issues/20827",0.65579575,{"labels":3097,"number":3101,"owner":3033,"repository":3033,"state":3066,"title":3102,"updated_at":3103,"url":3104,"score":3105},[3098,3099,3100],{"name":3043,"color":3044},{"name":3057,"color":3058},{"name":3060,"color":3061},12808,"Auto import for types like `Ref`","2023-02-07T10:41:57Z","https://github.com/nuxt/nuxt/issues/12808",0.6586284,{"description":3107,"labels":3108,"number":3110,"owner":3033,"repository":3033,"state":3066,"title":3111,"updated_at":3112,"url":3113,"score":3114},"### Environment\n\n- Operating System: Windows_NT\r\n- Node Version: v20.13.1\r\n- Nuxt Version: 3.12.3\r\n- CLI Version: 3.12.0\r\n- Nitro Version: 2.9.7\r\n- Package Manager: pnpm@8.9.2\r\n- Builder: -\r\n- User Config: devtools, app, runtimeConfig, ssr, experimental, pwa, sourcemap, typescript, modules, vite, primevue, unocss, imports, googleFonts, turnstile, supabase, css, postcss\r\n- Runtime Modules: @nuxtjs/turnstile@0.9.3, @unocss/nuxt@0.61.5, nuxt-primevue@3.0.0, @nuxtjs/google-fonts@3.2.0, @nuxtjs/supabase@1.3.5, @pinia/nuxt@0.5.1, @pinia-plugin-persistedstate/nuxt@1.2.1, @vueuse/nuxt@10.11.0, @vite-pwa/nuxt@0.9.1 \r\n- Build Modules: -\n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-c1luxa?file=app.vue\n\n### Describe the bug\n\n```js\r\nconst regex =\r\n /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*$/; //\r\n```\r\n\r\nOnce I use this regex anywhere in the script tag, all subsequent auto-imports stop working.\r\n\r\nSeriously, I often encounter this issue, especially when I write some content or comments within the template tags. Even though it fully complies with Vue's syntax, it causes compilation to fail until I either delete the content, change some words, or rewrite it differently. I don't understand the internal parsing logic of Nuxt or Vue3. This issue doesn't always happen, but it's quite common.\r\n\r\n\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[3109],{"name":3046,"color":3047},28190,"The regex caused the auto-imports to fail.","2024-07-17T10:29:01Z","https://github.com/nuxt/nuxt/issues/28190",0.6586718,{"labels":3116,"number":3120,"owner":3033,"repository":3033,"state":3066,"title":3121,"updated_at":3122,"url":3123,"score":3124},[3117,3118,3119],{"name":3060,"color":3061},{"name":3027,"color":3028},{"name":3030,"color":3031},14242,"ref is not defined when import.meta.glob is used when template has an html class","2023-01-19T17:30:08Z","https://github.com/nuxt/nuxt/issues/14242",0.6619669,{"description":3126,"labels":3127,"number":3136,"owner":3033,"repository":3033,"state":3066,"title":3137,"updated_at":3138,"url":3139,"score":3140},"### Describe the feature\n\nHi, I'm not sure if this is a feature request or just a question, but I didn't find any related issues / docs.\r\n\r\n**Context:** \r\n\r\nI have an ESLint configuration and it contains rules [`no-undef`](https://eslint.org/docs/latest/rules/no-undef) and [`vue/no-undef-components`](https://eslint.vuejs.org/rules/no-undef-components.html) that report undeclared functions/variables/components.\r\n\r\n\r\n\r\nNuxt automatically imports many things and I like it, I don't want to import them explicitly.\r\n[This is slightly related issue](https://github.com/nuxt/nuxt.js/issues/13413), but I don't need to import them explicitly, I need an option to retrieve a **names** of all auto-imported components/functions to declare them as global in `.eslintrc` file.\r\n\r\n**My current workaround** is define them manually and declare as global like that:\r\n\r\n\r\n\r\nAlthough this is a working solution, there are some limitations:\r\n- It needs to be filled manually\r\n- It doesn't update automatically if I register a new module that adds a global component (such as `@nuxt/image`) or new composables (such as `@vueuse/nuxt`)\r\n- It doesn't update if I set custom dirs to import in `nuxt.config.ts` via `imports.dirs` and create a new file inside it.\r\n- It doesn't update if new release of Vue/Nuxt includes a new features\r\n\r\nSo, a lot of manual work every time something was changed.\r\nThis can be done using custom module, but I believe it should be done by Nuxt itself.\r\n\r\n**Feature request:**\r\n\r\nExpose an auto-imported functions / components names to allow import them and mark as global in `.eslintrc`\r\n\r\n\r\n\r\n**Additional info**\r\n\r\nI know it's recommended to disable `no-undef` for TypeScript at all, but currently, as far I know, there is no robust way to separate `\u003Cscript lang=\"ts\">` and `\u003Cscript>` in ESLint confgurations for `.vue` files. \r\n\r\nAlso Nuxt isn't only TypeScript framework. and global components still needs to be configured\n\n### Additional information\n\n- [X] Would you be willing to help implement this feature?\n- [X] Could this feature be implemented as a module?\n\n### Final checks\n\n- [X] Read the [contribution guide](https://v3.nuxtjs.org/community/contribution).\n- [X] Check existing [discussions](https://github.com/nuxt/framework/discussions) and [issues](https://github.com/nuxt/framework/issues).",[3128,3129,3132,3133],{"name":3043,"color":3044},{"name":3130,"color":3131},"good first issue","fbca04",{"name":3060,"color":3061},{"name":3134,"color":3135},"🍰 p2-nice-to-have","0E8A16",15015,"Retrieve auto-imported component / function names","2024-03-13T22:57:05Z","https://github.com/nuxt/nuxt/issues/15015",0.66530365,{"description":3142,"labels":3143,"number":3151,"owner":3033,"repository":3033,"state":3066,"title":3152,"updated_at":3153,"url":3154,"score":3155},"### Environment\n\n------------------------------\r\n- Operating System: Darwin\r\n- Node Version: v20.5.1\r\n- Nuxt Version: 3.7.0\r\n- CLI Version: 3.7.3\r\n- Nitro Version: 2.6.2\r\n- Package Manager: pnpm@8.7.1\r\n- Builder: -\r\n- User Config: modules, auth, security, typescript, devtools, i18n, postcss, tailwindcss, vue, vite\r\n- Runtime Modules: nuxt-security@0.14.4, @sidebase/nuxt-auth@0.5.0, @nuxtjs/tailwindcss@6.8.0, nuxt-svgo@3.5.0, @vueuse/nuxt@10.4.1, @nuxtjs/i18n@8.0.0-rc.4\r\n- Build Modules: -\r\n------------------------------\n\n### Reproduction\n\nhttps://stackblitz.com/edit/nuxt-starter-xodh6t?file=modules%2Fexample%2Fpages%2Fsomething%2Findex.vue\n\n### Describe the bug\n\nThere are missing types from auto-imports, and that the ref, $fetch, or other variables are being inferred as `any` in modules.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[3144,3145,3146,3147,3148,3149],{"name":3130,"color":3131},{"name":3057,"color":3058},{"name":3060,"color":3061},{"name":3027,"color":3028},{"name":3030,"color":3031},{"name":3150,"color":3131},"✨ good reproduction",22988,"Incorrect types of auto-imports in modules","2023-09-22T07:25:54Z","https://github.com/nuxt/nuxt/issues/22988",0.678008,["Reactive",3157],{},["Set"],["ShallowReactive",3160],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fuC6ZdKlMRNtQOB8GXff4PbqsqyQQeIufNKtGXkwxgzQ":-1},"/nuxt/nuxt/14882"]