docs(installation): add tip to improve types in vue (#4318)

Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
Estéban
2025-06-10 15:58:09 +02:00
committed by GitHub
parent 9aea54267a
commit 145cae798c

View File

@@ -78,6 +78,22 @@ components.d.ts
::
::tip
Internally, Nuxt UI relies on custom alias to resolve the theme types. If you're using TypeScript, you should add an alias to your `tsconfig` to enable auto-completion in your `vite.config.ts`.
```json [tsconfig.node.json]
{
"compilerOptions": {
"paths": {
"#build/ui": [
"./node_modules/@nuxt/ui/.nuxt/ui"
]
}
}
}
```
::
#### Use the Nuxt UI Vue plugin in your `main.ts`
```ts [main.ts]{3,14}