mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 12:14:41 +01:00
docs(installation): add tip to improve types in vue (#4318)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user