Did you know that using an asterisk (*) as the package version when installing a package will ask yarn to look for a local package in your workspace? This is useful especially when working with monorepos.
$ yarn add yourpackage@*
This will only work when the following conditions are met:
- You are using Yarn Workspaces
- In your workspace have a package that matches the name of the package you are trying to install
Below I have a quick repo I created to demonstrate this