docs(installation): resolve missing theme prop types in vue#5706
docs(installation): resolve missing theme prop types in vue#5706benjamincanac merged 3 commits intonuxt:v4from
Conversation
commit: |
Updated the TypeScript configuration file reference for Nuxt UI.
Agreed. I have corrected the documentation to point to tsconfig.app.json as suggested. |
benjamincanac
left a comment
There was a problem hiding this comment.
No this is still incorrect, the #build/ui path should live in tsconfig.node.json and #build/ui/* in tsconfig.app.json, unless I'm missing something?
Updated TypeScript configuration examples for Nuxt UI.
You're absolutely right, that was my oversight. I've split the configuration as suggested:
|
🔗 Linked issue
This PR does not modify any program content; it mainly addresses the TypeScript suggestions issue.
❓ Type of change
📚 Description
Minimal Reproduction
In Vite + Vue projects, type definitions for theme-related props are currently missing. Following the official documentation setup results in incomplete type hints (specifically missing theme content).
After investigation, I identified that this is caused by missing paths in the
tsconfig.json.By adding
#build/ui/*to thecompilerOptions.paths, the issue is resolved and types are correctly inferred.{ "compilerOptions": { "paths": { "#build/ui": [ "./node_modules/.nuxt-ui/ui" ], "#build/ui/*": [ "./node_modules/.nuxt-ui/ui/*" ] } } }📝 Checklist