Say I have monorepo that looks like this:
frontend-a/ frontend-b/ shared-react-components/
And both frontend-a and frontend-b have shared-react-components as a dependency like:
"shared-react-components" : "file: ../shared-react-components"
And I want to host both frontend-a and frontend-b on netlify.
Ok, so using the base-directory field, that’s easy enough to do.
When building either frontend, I also need to build the dependencies. Is there a tidy way to do this?
The best I’ve got is making build command:
cd ../shared-react-components && npm i && npm run build && cd ../frontend-a && npm i && npm run build