This buildpack is for monorepos configured with yarn workspaces. This is an appropriation of the heroku-monorepo-buildpack.
It deals with the issue of not having a yarn.lock
. The yarn.lock
is important for ensuring that yarn
actually pulls the correct dependency versions once the app is deployed.
-
Set the
APP_BASE
configuration variable. It should point to the relative path of your intended workspace. e.g.packages/my-package
. -
Ensure you have a
yarn.lock
on your project's root directory. This buildpack will copy theyarn.lock
to theAPP_BASE
directory. This is helpful for Heroku to detect and automatically installyarn
in our behalf. -
Add this buildpack to your app using the command:
heroku buildpacks:add -a <app> https://github.com/jg-rivera/heroku-buildpack-yarn-workspaces