-
Notifications
You must be signed in to change notification settings - Fork 981
docs: resolve missing theme prop types in Vite + Vue setup #5706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v4
Are you sure you want to change the base?
Conversation
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're correct this was missing, but I believe this part should go inside tsconfig.app.json! We could add it in the tip above.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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