Yarn installs a dependency's optional dependencies by default. You can use --ignore-optional
to work around this.
I forget this so often that this repo now exists :|
To verify:
- Clone this repo
yarn test
- This will install relevant dependencies, and throw an exception if:
- The optional dependency is not installed
- The peer dependency is installed
- This will install relevant dependencies, and throw an exception if:
Expected output:
Is the optional dependency '@goodforonefare/solo-dependency-1' installed?
true
Is the peer dependency '@goodforonefare/solo-dependency-2' installed?
false