I've looked around a lot in the last few days ... and I was never able to succeed with this
What I'm trying to achieve: I am developing in a (forked) existing react library and I want to "link" the test project using this library to the development folder of the library, so that every change of the library code will be available inside the test project without the need to build the library first.
This (to me) sounds like something everyone is doing every day. Nevertheless, I'm not able to get it working on my side.
The library has its own dependencies (obviously)
What I did: I tried to use this to link the test project to the library
cd my-test-project
npm link ../my-react-library
Is this a correct step? What else do I need to do in order to be able to use a component from this library in my test project?
EDIT: Ok, I can see the link with npm ls
, so I guess it is the right way to start. But what next?
>> npm ls -g --depth=0 --link=true
C:\Users\xxxxxx\AppData\Roaming\npm
├── my-react-library@4.10.0 -> .\D:\Project Folders\ReactProjects\my-react-library
└── react@17.0.2 -> .\D:\Project Folders\ReactProjects\...............\node_modules\react