If you are following a micro frontend architecture for your react project. You would have kept your ui-components in a different repo. (e.g: ui-elements).
If you wanted to install that micro frontend repo to your parent repo. Then follow these steps:
npm build
Now copy the address to the repo. It would be something like:
D:/
Go to the repo where the package to be installed (e.g: parent-app)
Go to your package.json file, give the package name in dependency and in the place of version you give "D://ui-elements"
Now run:
npm i
Your package is now installed.
The above is the detailed content of Installing your react.js local package registry to your project. For more information, please follow other related articles on the PHP Chinese website!