feat: add per-icon default imports - #117
Conversation
|
@sandersonstabo is attempting to deploy a commit to the senlys Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedToo many files! This PR contains 668 files, which is 518 over the limit of 150. To get a review, narrow the scope: Upgrade to a paid plan to raise the limit. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (668)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Note: This patch was written by GPT.
Summary
src/lib/icons/*entrypoints that default-export individual Svelte logo components@selemondev/svgl-svelte/icons/*through the package export map with matching type resolutionThis allows imports like:
The problem
Barrel imports like
import { SvglViteLogo } from "@selemondev/svgl-svelte"cripple the TS LSP server and the Svelte one. Icon libaries like Tabler and Lucide allow you to default import icons like these to avoid loading thousands of icons at once and only the one you need.Validation
pnpm prepackpnpm exec prettier --check package.json scripts/index.ts README.md src/lib/icons/vite.ts src/lib/icons/visual-studio-code.tspnpm exec tsc --noEmit --module ESNext --moduleResolution Bundler --target ESNext --strict --skipLibCheck ./.codex-verify-icons.tspnpm exec tsc --noEmit --module NodeNext --moduleResolution NodeNext --target ESNext --strict --skipLibCheck ./.codex-verify-icons.ts