0

I'm going to have 2 separate React Apps in a single lerna/yarn workspaces repo which will need to use the same components.

What's the best way to reuse these components in multiple application without publishing it to a separate private NPM package?

aiven715
  • 89
  • 1
  • 1
  • 8

1 Answers1

0

Locally

You could install the dependency from a local folder.

npm install /path

https://stackoverflow.com/a/26028854/5508175

From a github repo

It is also possible to install from a GitHub repo

npm install --save username/repo#branch-name

https://link.medium.com/XYBpwAdRZS

Andrew
  • 26,706
  • 9
  • 85
  • 101