\n\nI'm also using UModal, UCard elsewhere in the app itself, they do work there.\nSo what do I need to do to get these files parsed my vite/vue/nuxt ui?",[3134],{"name":3135,"color":3136},"question","d876e3",4892,"nuxt","ui","open","Using Nuxt UI in components from a npm package, in Vue","2025-09-05T08:48:22Z","https://github.com/nuxt/ui/issues/4892",0.6648621,{"description":3146,"labels":3147,"number":3154,"owner":3138,"repository":3138,"state":3140,"title":3155,"updated_at":3156,"url":3157,"score":3158},"### Describe the feature\n\nNuxt and its great, out-of-the-box DX are really enjoyable. However, I still prefer explicit imports over automatic ones, with exception for very well-known utilities and composables; such as the ones exposed by Vue's core.\n\nWhile configuring Nuxt to disable the auto-importing of almost everything, I noticed the API isn't really intuitive and could be improved. The problem is that in addition to having set `imports: { autoImport: false }`, we have to explicitly disable component auto-imports using `components: false` or `components: { dirs: [] }`. Even though everything is documented well, having to separately disable component auto-imports feels like an extra, not-really-obvious step. TBH, this isn't a big deal. However, things get worse when it comes to not just disabling auto-imports, but rather customizing it.\n\nI wanted to disable all auto-imports, and only have the presets of Vue & Vitest auto-imported. Unfortunately, the API isn't flexible enough to let me do something like this and call it a day:\n```ts\nimports: {\n autoImport: 'presets', // Boolean | 'presets'\n presets: ['vitest', /* Vue's preset seems to be included by default. */],\n},\n```\n\nSo, I came up with this solution by playing around with different `imports` hooks:\n```ts\n// Disable auto-importing custom components, composables, and utilities.\ncomponents: {\n dirs: [],\n},\nimports: {\n presets: ['vitest'],\n},\nhooks: {\n 'imports:extend': (imports) => {\n imports.length = 0;\n },\n}, \n```\n\n\u003Cbr />\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).",[3148,3151],{"name":3149,"color":3150},"enhancement","8DEF37",{"name":3152,"color":3153},"pending triage","E99695",29275,"Better API for Auto Imports Customization","2024-10-08T08:40:01Z","https://github.com/nuxt/nuxt/issues/29275",0.68740714,{"description":3160,"labels":3161,"number":3165,"owner":3138,"repository":3138,"state":3166,"title":3167,"updated_at":3168,"url":3169,"score":3170},"I am using Nuxt with Typescript. I create a following component:\r\n\r\n \u003Ctemplate>\r\n \u003Cdiv class=\"field\">\r\n \u003Clabel class=\"label\" v-if=\"typeof label !== 'undefined'\">{{ label }}\u003C/label>\r\n \u003Cdiv class=\"control\">\r\n \u003Ctextarea\r\n v-if=\"inputType === 'textarea'\"\r\n class=\"textarea\"\r\n @input=\"$emit('input', $event.target.value)\"\r\n >\u003C/textarea>\r\n \u003Cinput\r\n v-if=\"inputType === 'input'\"\r\n :type=\"type\"\r\n class=\"input\"\r\n @input=\"$emit('input', $event.target.value)\"\r\n >\r\n \u003C/div>\r\n \u003C/div>\r\n \u003C/template>\r\n \r\n \u003Cscript lang=\"ts\">\r\n import { Vue, Component, Prop } from \"vue-property-decorator\"\r\n \r\n @Component({})\r\n export default class AppInput extends Vue {\r\n @Prop({ type: String, required: false, default: \"input\" })\r\n inputType!: string\r\n \r\n @Prop({ type: String, required: false })\r\n label!: string\r\n \r\n @Prop({ type: String, required: false, default: \"text\" })\r\n type!: string\r\n }\r\n \u003C/script>\r\n \r\n \u003Cstyle>\r\n \u003C/style>\r\n\r\nAnd then in `@/plugins/components.ts`, I import the component as following:\r\n\r\n import Vue from \"vue\"\r\n import AppInput from \"@/components/Forms/AppInput.vue\"\r\n \r\n Vue.component(\"AppInput\", AppInput)\r\n\r\nWhen I compile the project with Nuxt, it throws me `export 'default' (imported as 'mod') was not found` error. Please help!\n\n\u003C!--cmty-->\u003C!--cmty_prevent_hook-->\n\u003Cdiv align=\"right\">\u003Csub>\u003Cem>This question is available on \u003Ca href=\"https://cmty.app/nuxt\">Nuxt\u003C/a> community (\u003Ca href=\"https://cmty.app/nuxt/nuxt.js/issues/c9028\">#c9028\u003C/a>)\u003C/em>\u003C/sub>\u003C/div>",[3162],{"name":3163,"color":3164},"2.x","d4c5f9",5508,"closed","Nuxt export 'default' (imported as 'mod') was not found","2023-01-18T20:12:55Z","https://github.com/nuxt/nuxt/issues/5508",0.65300655,{"labels":3172,"number":3174,"owner":3138,"repository":3138,"state":3166,"title":3175,"updated_at":3176,"url":3177,"score":3178},[3173],{"name":3163,"color":3164},4134,"TS2314: Generic type 'ComponentOptions\u003CV>' requires 1 type argument(s).","2023-01-18T20:03:58Z","https://github.com/nuxt/nuxt/issues/4134",0.66581535,{"description":3180,"labels":3181,"number":3184,"owner":3138,"repository":3138,"state":3166,"title":3185,"updated_at":3186,"url":3187,"score":3188},"### What problem does this feature solve?\n\nI'm trying to find a way to read `props` from every .vue component in the project and write the result to a JSON file.\n\nIt should happen server side so I've tried creating a custom nuxt command and a module. The problem with these is I can't actually import a component, it's just a syntax error because components are not just JS. Even after a `nuxt build` when the components are reduced to being just JS in the `.nuxt` folder I still couldn't figure out how to read the props from that mess. I spent a few days on google, reading other modules, nuxt documentation and source code but couldn't find a way to extract details about components.\n\nWhat does work is a plugin in server only mode. I can read and write files, import components, read the props. Basically everything I wanted. But now the issue is that it's a plugin and that's not what plugins are for. This script should only run once during build but a plugin will run on every page load.\n\nSo I'd like to see a generally good way of messing with components from a command line script.\n\n\u003C!--cmty-->\u003C!--cmty_prevent_hook-->\n\u003Cdiv align=\"right\">\u003Csub>\u003Cem>This feature request is available on \u003Ca href=\"https://cmty.app/nuxt\">Nuxt\u003C/a> community (\u003Ca href=\"https://cmty.app/nuxt/nuxt.js/issues/c9773\">#c9773\u003C/a>)\u003C/em>\u003C/sub>\u003C/div>",[3182,3183],{"name":3149,"color":3150},{"name":3163,"color":3164},6411,"Using components in modules","2023-01-22T15:51:03Z","https://github.com/nuxt/nuxt/issues/6411",0.66887856,{"labels":3190,"number":3193,"owner":3138,"repository":3138,"state":3166,"title":3194,"updated_at":3186,"url":3195,"score":3196},[3191,3192],{"name":3149,"color":3150},{"name":3163,"color":3164},6517,"Add example on how to use with @vue/composition-api","https://github.com/nuxt/nuxt/issues/6517",0.6752901,{"description":3198,"labels":3199,"number":3209,"owner":3138,"repository":3138,"state":3166,"title":3210,"updated_at":3211,"url":3212,"score":3213},"### Environment\n\n- Operating System: `Darwin`\r\n- Node Version: `v16.18.1`\r\n- Nuxt Version: `3.3.2`\r\n- Nitro Version: `2.3.2`\r\n- Package Manager: `npm@8.19.2`\r\n- Builder: `vite`\r\n- User Config: `-`\r\n- Runtime Modules: `-`\r\n- Build Modules: `-`\r\n\n\n### Reproduction\n\nhttps://github.com/niklv/nuxt-component-props-def-bug\n\n### Describe the bug\n\nFor my project config typing I need to refer to typing of component props.\r\nI try extract props typing in this way. But looks like there are no props typing at all.\r\n```vue\r\n\u003Cscript lang=\"ts\" setup>\r\n// ComponentA.vue\r\nconst {propA} = defineProps\u003C{\r\n propA: string\r\n}>()\r\n\u003C/script>\r\n\r\n\u003Ctemplate>\r\n \u003Cdiv v-text=\"propA\" />\r\n\u003C/template>\r\n\r\n```\r\n\r\n```ts\r\n// config.ts\r\nimport type {ComponentA} from \"#components\";\r\nimport {ComponentOptionsBase} from \"@vue/runtime-core\";\r\n\r\n\r\ntype ComponentProps\u003CT> = T extends ComponentOptionsBase\u003Cinfer P, // Props\r\n any, // RawBindings\r\n any, // D\r\n any, // C\r\n any, // M\r\n any, // Mixin\r\n any, // Extends\r\n any> ? unknown extends P ? {} : P : {};\r\n\r\n\r\ntype CompAProps = ComponentProps\u003Ctypeof ComponentA>\r\n\r\n\r\nconst someConfig:CompAProps = {\r\n // @ts-expect-error\r\n notExistedProp: true // should be error\r\n}\r\n```\n\n### Additional context\n\n\r\n\r\nThere are must be some props typing in first generic argument of `DefineComponent`\n\n### Logs\n\n_No response_",[3200,3203,3206],{"name":3201,"color":3202},"types","2875C3",{"name":3204,"color":3205},"3.x","29bc7f",{"name":3207,"color":3208},"upstream","E8A36D",20010,"Empty global components props typings","2023-10-22T09:01:34Z","https://github.com/nuxt/nuxt/issues/20010",0.6766678,{"labels":3215,"number":3218,"owner":3138,"repository":3138,"state":3166,"title":3219,"updated_at":3220,"url":3221,"score":3222},[3216,3217],{"name":3149,"color":3150},{"name":3163,"color":3164},8227,"Can we export nuxt project as web components ?","2023-02-14T11:31:45Z","https://github.com/nuxt/nuxt/issues/8227",0.67734367,{"description":3224,"labels":3225,"number":3230,"owner":3138,"repository":3138,"state":3166,"title":3231,"updated_at":3232,"url":3233,"score":3234},"### Environment\r\n\r\n- Operating System: Darwin\r\n- Node Version: v18.14.0\r\n- Nuxt Version: 3.6.1\r\n- Nitro Version: 2.5.2\r\n- Package Manager: yarn@1.22.19\r\n- Builder: vite\r\n- User Config: -\r\n- Runtime Modules: -\r\n- Build Modules: -\r\n\r\n**VsCode 1.79.2**\r\n- vscode.typescript-language-features: disabled\r\n- Vue.volar: 1.8.3, enabled\r\n- Vue.vscode-typescript-vue-plugin: 1.8.3, enabled\r\n\r\n### Reproduction\r\n\r\nhttps://github.com/niklas-may/nuxt-module-issue-reproduction\r\n\r\n### Describe the bug\r\n\r\n**Preface**\r\n_Thank you for your amazing work on Nuxt! I am not sure where this issue is best raised, Nuxt, VsCode or Vue. But due to the special typescript tooling with auto imports, I thought it's best to start here, and would be happy to hear if anybody observed a similar behaviour or has a solution._ \r\n\r\n**Description**\r\nWhen I open `~/.nuxt/components.d.ts` in VsCode and hover over an imported component, VsCode IntelliSense popover displays the correct types for this component.\r\nBut when I use the component in any other components template block, for example `~/app.vue`, the typing is missing the prop types.\r\n\r\n### Component and Type Definitions\r\n\r\n`~/../src/runtime/MyButton.vue`\r\n\r\n```vue\r\n\u003Ctemplate>\r\n \u003Cdiv style=\"border: 1px solid pink\">\r\n \u003Cslot />\r\n \u003C/div>\r\n\u003C/template>\r\n\u003Cscript setup lang=\"ts\">\r\nwithDefaults(\r\n defineProps\u003C{\r\n variant: \"fill\" | \"ghost\";\r\n }>(),\r\n { variant: \"fill\" }\r\n);\r\n\u003C/script>\r\n```\r\n\r\n`~/.nuxt/components.d.ts`\r\n\r\n```TypeScript\r\ndeclare module 'vue' {\r\n export interface GlobalComponents {\r\n //...\r\n 'MyButton': typeof import(\"../../src/runtime/components/MyButton.vue\")['default']\r\n //...\r\n }\r\n}\r\n\r\nexport const MyButton: typeof import(\"../../src/runtime/components/MyButton.vue\")['default']\r\n\r\nexport const componentNames: string[]\r\n```\r\n\r\n\r\n### Correct Intellisense\r\n\r\nVsCode popopver hovering `'MyButton'` in `~/.nuxt/components.d.ts`\r\n\r\n```TypeScript\r\n(property) GlobalComponents['MyButton']: __VLS_WithTemplateSlots\u003CDefineComponent\u003C{\r\n variant: {\r\n type: PropType\u003C\"fill\" | \"ghost\">;\r\n required: true;\r\n default: string;\r\n };\r\n}, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ... 5 more ..., {}>, {\r\n ...;\r\n}>\r\n````\r\n\r\n### Wrong Intellisense\r\n\r\nVsCode popopver hovering `\u003CMyButton />` in the template block of `~/app.vue` (or any other template)\r\n\r\n```TypeScript\r\n(property) 'MyButton': DefineComponent\u003C{}, {}, any>\r\n```\r\n\r\n### Additional context\r\n\r\nThe above example is the current state of the reproduction repo. But a different, but similar behavior happened in other reports (for example a yarn workspace repo). Strange enough, sometimes, it works fine...\r\n\r\n### Logs\r\n\r\n_No response_",[3226,3227,3228,3229],{"name":3201,"color":3202},{"name":3204,"color":3205},{"name":3152,"color":3153},{"name":3207,"color":3208},21933,"Component appears to be untyped in template block","2023-12-12T14:36:22Z","https://github.com/nuxt/nuxt/issues/21933",0.67824614,{"labels":3236,"number":3239,"owner":3138,"repository":3138,"state":3166,"title":3240,"updated_at":3241,"url":3242,"score":3243},[3237,3238],{"name":3149,"color":3150},{"name":3204,"color":3205},12962,"Type Support for Global Components (e.g. `\u003Cnuxt-link>`)","2023-01-19T16:39:56Z","https://github.com/nuxt/nuxt/issues/12962",0.67962223,["Reactive",3245],{},["Set"],["ShallowReactive",3248],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$frRNtS4HsMErgJTz8YgfpvvjQ22DJr2i43smy9y6DD70":-1},"/nuxt/ui/2891"]