ionic icon indicating copy to clipboard operation
ionic copied to clipboard

help: Nuxt auto-import doesn't display ionic component types

Open KiddoV opened this issue 2 years ago • 1 comments

📚 What are you trying to do?

The auto-import component should point to an ionic type right?

type

But VSCode only assume it is a any type.

🔍 What have you tried?

No response

ℹ️ Additional context

//index.vue
<script setup lang="ts">
definePageMeta({
    alias: ["/", "/overview"],
})
</script>

<template>
    <ion-page translucent>
        <ion-toolbar>
            <ion-title>Overview</ion-title>
        </ion-toolbar>
    </ion-page>
</template>
//tsconfig.json
{
  // https://nuxt.com/docs/guide/concepts/typescript
  "extends": "./.nuxt/tsconfig.json",
  "compilerOptions": {
    "baseUrl": "",
    "types": []
  },
}

KiddoV avatar Dec 19 '23 18:12 KiddoV

You might need to explicitly install @ionic/vue or set shamefully-hoist=true in your .npmrc file.

danielroe avatar Jan 09 '24 11:01 danielroe

use npm install @ionic/vue -D

berial avatar Jul 10 '24 09:07 berial