nuxt-community / vuetify-module

Vuetify Module for Nuxt 2
Other
630 stars 106 forks source link

TypeScript question #467

Open mirabledictu opened 2 years ago

mirabledictu commented 2 years ago

Hello, what is the difference between @nuxt/types and @nuxt/vue-app?

When generating a fresh Nuxt TypeScript app, you'll get @nuxt/types in the types property of tsconfig.json already. But in the README of vuetify-module, you have this:

{
  "compilerOptions": {
    "types": [
      "@types/node",
      "@nuxt/vue-app",
      "@nuxtjs/vuetify"
    ]
  }
}

Are they different?

MartinX3 commented 2 years ago

It's not easy to understand. But I think we should use @nuxt/types since Nuxt 2.9.0+ and remove @nuxt/vue-app. I think the documentation of this plugin is just too old.

That's the right way:

    "types": [
      "@types/node",
      "@nuxt/types",
      "@nuxtjs/vuetify"
    ]

I also found this https://github.com/nuxt/nuxt.js/blob/dev/packages/vue-app/index.d.ts