I got an issue here i tried to resolve but it does not work until now. In my Nuxt.config.ts i got this:
alias: {
'@layer': path.resolve(__dirname, './'),
},
in the tsconfig.json:
"paths": {
"@layer/*": ["./*"]
}
Now i try to import e.g.:
import Button from '@layer/components/elements/AppButton.vue'
which should always reference to the layers own root path, not the project ones because in the Nuxt Layer Structure, it wouldn’t work when extending layer on top of each other (referencing to the project root would lead to resolve errors).
The import does work, but the IDE shows an error whilst importing: Typedeclaration is missing. I got a vue-shim for it:
declare module '*.vue' {
import type { DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, any>
export default component
}
Which should resolve it, but doesn’t help. How can i solve this issue here?