Download the example:
Install it and run:
yarn
yarn dev
Deploy it to the cloud with now (download)
now -A now-site1.json
now -A now-site2.json
Workspaces are a new way to setup your package architecture that’s available by default starting from Yarn 1.0. It allows you to setup multiple packages in such a way that you only need to run yarn install once to install all of them in a single pass.
In this example we have three workspaces:
- site1: A Next.js app
- site2: A Next.js app
- shared: Shared React components, that gets compiled by Next.js