ionic
ionic copied to clipboard
help: Nuxt auto-import doesn't display ionic component types
📚 What are you trying to do?
The auto-import component should point to an ionic type right?
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": []
},
}
You might need to explicitly install @ionic/vue or set shamefully-hoist=true in your .npmrc file.
use npm install @ionic/vue -D