๐ Linked issue
N/A (discussed privately on discord)
โ 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
What the PR delivers is a non-breaking internal-only import paths move, the public @nuxt/ui/../types barrel is untouched.
The clear win is that a clean consumer importing 5 components pulls 9 @nuxt/ui component declarations instead of 170+. The type graph scales with components used, reducing type instantiations on small to mid apps while reducing memory footprint during dev, largest gains for subset apps. This becomes especially true for locales, where hardly any apps would use them all at ones.
I decided to add a small guard, safe to remove it is a bit too much: the ESLint rule prevents re-barreling (validated by catching a reintroduced bare ../types import and allows specific ../types/* modules + the intentional useComponentProps namespace import).
๐ Checklist
- I have linked an issue or discussion.
- I have updated the documentation accordingly.