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:
- Go to your repo which needed to be installed (e.g: ui-elements) and run build command:
npm build
Now copy the address to the repo. It would be something like:
D:/<some-folder>/ui-elements
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.
Top comments (0)