vuetifyjs / nuxt-module

Zero-config Nuxt Module for Vuetify
https://nuxt.vuetifyjs.com/
MIT License
226 stars 22 forks source link

[Bug] vuetify-nuxt-module NuxtApp type interfering with Nuxt's NuxtApp type #145

Closed mtdvlpr closed 1 year ago

mtdvlpr commented 1 year ago

Since I updated vuetify-nuxt-module from 0.6.0 to 0.6.5 I have issues with my plugins. Somehow vuetify-nuxt-module is overwriting the return type of UseNuxtApp() so that it only contains $vuetify and not my own provided plugins. See https://github.com/mtdvlpr/reproduction/tree/vuetify for a reproduction.

userquin commented 1 year ago

I Will revert last commit tmr about module augmentation

mtdvlpr commented 1 year ago

@userquin thanks! BTW, you're probably already aware, but Vuetify has finally released v3.4.0 so this module needs to update the references from prior lab components.

userquin commented 1 year ago

@userquin thanks! BTW, you're probably already aware, but Vuetify has finally released v3.4.0 so this module needs to update the references from prior lab components.

If you install the new Vuetify version, the types should be updated: https://github.com/userquin/vuetify-nuxt-module/blob/main/src/types.ts#L137-L143

mtdvlpr commented 1 year ago

I'm getting the following error without specifying any labComponents in the config:

Failed to resolve import "vuetify/labs/VDatePicker" from "..\..\..\..\..\..\@nuxt-vuetify-configuration\vuetify-configuration". Does the file exist?

Edit: it's because I specify date options which executes the following code from you:

if (dateOptions && addDatePicker) {
    config.imports.push("import {VDatePicker} from 'vuetify/labs/VDatePicker'");
    config.labComponents.add("VDatePicker");
  }

Edit: Also the useDate composable is not imported and should be imported by default starting with Vuetify 3.4