Skip to content

Conversation

@Codfisher
Copy link

🔗 Linked issue

This PR does not modify any program content; it mainly addresses the TypeScript suggestions issue.

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to 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).

image

After investigation, I identified that this is caused by missing paths in the tsconfig.json.

By adding #build/ui/* to the compilerOptions.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/*"
      ]
    }
  }
}
image

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@github-actions github-actions bot added the v4 #4488 label Dec 19, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 19, 2025

npm i https://pkg.pr.new/@nuxt/ui@5706

commit: b675514

@Codfisher Codfisher changed the title docs: Added #build/ui/* setting to resolve the issue of missing theme… docs: resolve missing theme prop types in Vite + Vue setup Dec 19, 2025
Copy link
Member

@benjamincanac benjamincanac left a 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.
@Codfisher
Copy link
Author

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.你說得沒錯,確實缺了這個零件,但我相信這部分應該放進 tsconfig.app.json!我們可以把它加到上面的提示裡。

Agreed. I have corrected the documentation to point to tsconfig.app.json as suggested.

Copy link
Member

@benjamincanac benjamincanac left a 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.
@Codfisher
Copy link
Author

Codfisher commented Dec 20, 2025

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?

You're absolutely right, that was my oversight.

I've split the configuration as suggested:

  • #build/ui is now in tsconfig.node.json

  • #build/ui/* is added to tsconfig.app.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v4 #4488

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants