I have two git repos;
- one is a component library, containing multiple components which are all individually exported to bit.dev
- two is a next/react app that uses the components from the library
My folders are roughly;
component-library
|- .bitmap
|- /src
|- /button
|- /button.js
|- /header
|- /header.js
next-react-project
|- /src
|- /pages
|- /home.js
I want to be able to see local changes to my components in my react app without having to first tag and export them to bit. Before using bit.dev, i'd do this by running something like npm link ../component-library
.
How can I achieve this with bit.dev?
Since bit harmony, bit added a
--target
flag to the bit link command. The usage is:If you want to use it the same way you use
npm link
and link your packages globally, you can run this command in your workspace:Then inside the project (your next/react app) where you want to install the package: