nuxt-authorization
nuxt-authorization copied to clipboard
`defineAbility` auto-import isn't working
Additionally to #70, the auto-import for defineAbility seems broken and shows type errors if not imported manually.
Repro is the same as #70: https://stackblitz.com/edit/github-kun89cza?file=app%2Fapp.vue
I have the same issue after updating the root tsconfig.json file of my Nuxt app to the new structure:
{
// https://nuxt.com/docs/guide/concepts/typescript
"files": [],
"references": [
{
"path": "./.nuxt/tsconfig.app.json"
},
{
"path": "./.nuxt/tsconfig.server.json"
},
{
"path": "./.nuxt/tsconfig.shared.json"
},
{
"path": "./.nuxt/tsconfig.node.json"
}
]
}
Coming back to the old:
{
// https://nuxt.com/docs/guide/concepts/typescript
"extends": "./.nuxt/tsconfig.json"
}
fixes the issue. Any clue @Barbapapazes ?
"extends": "./.nuxt/tsconfig.json"
It works, but it will be removed in future versions of Nuxt and is less optimal in terms of performance.