\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?",[3174],{"name":3175,"color":3176},"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":3186,"labels":3187,"number":3194,"owner":3178,"repository":3178,"state":3180,"title":3195,"updated_at":3196,"url":3197,"score":3198},"### 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).",[3188,3191],{"name":3189,"color":3190},"enhancement","8DEF37",{"name":3192,"color":3193},"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":3200,"labels":3201,"number":3205,"owner":3178,"repository":3178,"state":3206,"title":3207,"updated_at":3208,"url":3209,"score":3210},"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>",[3202],{"name":3203,"color":3204},"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":3212,"number":3214,"owner":3178,"repository":3178,"state":3206,"title":3215,"updated_at":3216,"url":3217,"score":3218},[3213],{"name":3203,"color":3204},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":3220,"labels":3221,"number":3224,"owner":3178,"repository":3178,"state":3206,"title":3225,"updated_at":3226,"url":3227,"score":3228},"### 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>",[3222,3223],{"name":3189,"color":3190},{"name":3203,"color":3204},6411,"Using components in modules","2023-01-22T15:51:03Z","https://github.com/nuxt/nuxt/issues/6411",0.66887856,{"labels":3230,"number":3233,"owner":3178,"repository":3178,"state":3206,"title":3234,"updated_at":3226,"url":3235,"score":3236},[3231,3232],{"name":3189,"color":3190},{"name":3203,"color":3204},6517,"Add example on how to use with @vue/composition-api","https://github.com/nuxt/nuxt/issues/6517",0.6752901,{"description":3238,"labels":3239,"number":3249,"owner":3178,"repository":3178,"state":3206,"title":3250,"updated_at":3251,"url":3252,"score":3253},"### 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_",[3240,3243,3246],{"name":3241,"color":3242},"types","2875C3",{"name":3244,"color":3245},"3.x","29bc7f",{"name":3247,"color":3248},"upstream","E8A36D",20010,"Empty global components props typings","2023-10-22T09:01:34Z","https://github.com/nuxt/nuxt/issues/20010",0.6766678,{"labels":3255,"number":3258,"owner":3178,"repository":3178,"state":3206,"title":3259,"updated_at":3260,"url":3261,"score":3262},[3256,3257],{"name":3189,"color":3190},{"name":3203,"color":3204},8227,"Can we export nuxt project as web components ?","2023-02-14T11:31:45Z","https://github.com/nuxt/nuxt/issues/8227",0.67734367,{"description":3264,"labels":3265,"number":3270,"owner":3178,"repository":3178,"state":3206,"title":3271,"updated_at":3272,"url":3273,"score":3274},"### 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_",[3266,3267,3268,3269],{"name":3241,"color":3242},{"name":3244,"color":3245},{"name":3192,"color":3193},{"name":3247,"color":3248},21933,"Component appears to be untyped in template block","2023-12-12T14:36:22Z","https://github.com/nuxt/nuxt/issues/21933",0.67824614,{"labels":3276,"number":3279,"owner":3178,"repository":3178,"state":3206,"title":3280,"updated_at":3281,"url":3282,"score":3283},[3277,3278],{"name":3189,"color":3190},{"name":3244,"color":3245},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",3285],{},["Set"],["ShallowReactive",3288],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$frRNtS4HsMErgJTz8YgfpvvjQ22DJr2i43smy9y6DD70":-1},"/nuxt/ui/2891"]