moishinetzer / PBandJ

Zero-Config Reusable Component Framework for React 🥜💜
MIT License
109 stars 6 forks source link

yarn link support? #43

Open maybebansky opened 1 year ago

maybebansky commented 1 year ago

As much as Storybook is great, sometimes I want to test a library in another repo, and id like to be able to do this before publishing. Can this be done with PRandJ?

Ive done this previously with "yarn link". When I run the command it looks promising:

success Registered "PROJECT-NAME".
info You can now run `yarn link "PROJECT-NAME"` in the projects where you want to use this package and it will be used instead.
✨  Done in 0.02s.

But when I try and use it in another repo I get an error:

Module not found: Can't resolve 'PROJECT-NAME'

These steps have worked for me before when my component library was just a .tsx file, so im not sure if my set up is wrong or if this wont work with PRandJ?

moishinetzer commented 1 year ago

Can you try this using npm link and see if that works? This could be a yarn issue rather than an issue with this project