https://stackblitz.com/edit/nuxt-starter-5qj9ao?file=nuxt.config.ts
Defaults work, but components inside aliases have a Component is missing template or render function warning and don't render.
From a quick look at source code, I think it's because they don't get mapped to the components properly like the regular aliases config property.
Current hack solution
// vuetify.config.ts
...
blueprint: {
defaults: blueprint.defaults,
},
aliases: blueprint.aliases,
...
// blueprint.ts
import type { ComponentName } from 'vuetify-nuxt-module'
export default {
aliases: {
MyBtn: 'VBtn',
} as Record<string, ComponentName>,
...
}
Bonus tip for anyone dealing with Typescript and needing Intellisense on your virtual components:
declare module '@vue/runtime-dom' {
export interface GlobalComponents {
MyBtn: typeof import('vuetify/components')['VBtn']
}
}
https://stackblitz.com/edit/nuxt-starter-5qj9ao?file=nuxt.config.ts
Defaults work, but components inside aliases have a
Component is missing template or render functionwarning and don't render.From a quick look at source code, I think it's because they don't get mapped to the components properly like the regular aliases config property.
Current hack solution
Bonus tip for anyone dealing with Typescript and needing Intellisense on your virtual components: