-
-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
Reproduction
https://stackblitz.com/edit/github-xblyxqpf
Description
app/plugins/vuetify.ts:2:16 - error TS2345: Argument of type '"vuetify:configuration"' is not assignable to parameter of type 'HookKeys<RuntimeNuxtHooks>'.
2 nuxtApp.hook('vuetify:configuration', () => {
~~~~~~~~~~~~~~~~~~~~~~~
Found 1 error.
Nuxt now generates separate TypeScript configurations for different contexts to provide better type-checking experiences
Ref: https://nuxt.com/docs/4.x/getting-started/upgrade#typescript-configuration-splitting
.nuxt/nuxt.node.d.ts
which includes required types /// <reference types="vuetify-nuxt-module" />
is now longer included in the tsconfig for runtime code. Those types may need to be moved to something like vuetify-nuxt-module/runtime
workaround:
export default defineNuxtConfig({
typescript: {
tsconfig:{
compilerOptions: {
types: ['vuetify-nuxt-module'],
}
}
},
}
Others
vuetify.config.ts
also needs to be included in tsconfig.node.json
. My current workaround is
// nuxt.config.ts
export default defineNuxtConfig({
typescript: {
nodeTsConfig: {
include: ['../vuetify.config.ts'],
},
},
}
Metadata
Metadata
Assignees
Labels
No labels