ieedan / jsrepo

♻️ The best way to reuse your code.
https://jsrepo.dev
MIT License
123 stars 7 forks source link

feat: Support for path aliases #215

Closed ieedan closed 2 days ago

ieedan commented 2 days ago

I have been thinking about how to nicely add this one for a while I think this is probably the best way at this point.

During build we use get-tsconfig to find the nearest tsconfig/jsconfig and use the paths to figure out what other local dependencies there are.

In short we can now resolve stuff like $lib/components/ui/button or $lib/utils/utils provided those paths are also blocks.

I think this is a big step for usage in component libraries as aliases are common place there.

I am thinking this may not be merged until Monday so if anyone has the chance please play around with the preview and let me know how everything works!

Changes

TODO:

changeset-bot[bot] commented 2 days ago

🦋 Changeset detected

Latest commit: 62e73b59fdc28ce8bb38db801143e48984c45843

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ------ | ----- | | jsrepo | Minor |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

vercel[bot] commented 2 days ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
jsrepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 30, 2024 0:10am
pkg-pr-new[bot] commented 2 days ago

Open in Stackblitzregistryproject

npm i https://pkg.pr.new/ieedan/jsrepo@215

commit: 62e73b5