A minimal repository for monorepo testing.
- /consumer - The main project
- /shared - A local shared dependency
These can be run with yarn run
or npm run
:
install:npm
: "npm install",install:yarn
: "yarn install",start:npm
: "node --preserve-symlinks index.js",start:yarn
: "node index.js"
Pros:
- Updates to files in /shared are immediate availabe in /consumer
Cons:
- The node process must be run with the
--preserve-symlinks
flag, otherwise theshared
module doesn't have access to peer dependencies.
Pros:
- We can run the node process as normal because peer dependencies are accessible from
shared
(needs more research)
Cons:
- Updates to files in /shared require a reinstall of /consumer for some reason (needs more research)