rsnext/examples/with-yarn-workspaces
paulogdm 3400052cbb
Delete vercel.json from "yarn workspaces" example (#17263)
This PR removes "vercel.json" from the Yarn workspaces example. Since the release of [monorepos](https://vercel.com/blog/monorepos) support, there is no need to use the "builds" property or "vercel.json".
2020-09-21 16:39:51 +00:00
..
packages Update next-transpile-modules in all examples (#15739) 2020-07-31 15:53:53 +00:00
.gitignore Ignore .next also in subfolders (#16962) 2020-09-09 16:13:13 +00:00
package.json chore: update example names to match their folders (#16268) 2020-09-05 21:23:51 +00:00
README.md Simplify example usage instructions (#16678) 2020-08-29 22:22:02 -04:00

Yarn workspaces example

Workspaces are a new way to setup your package architecture thats 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:

  • web-app: A Next.js app
  • foo: A normal node module
  • bar: A react component, that gets compiled by Next.js (see packages/web-app/next.config.js for more info)

Deploy your own

Deploy the example using Vercel:

Deploy with Vercel

How to use

Execute create-next-app with npm or Yarn to bootstrap the example:

npx create-next-app --example with-yarn-workspaces with-yarn-workspaces-app
# or
yarn create next-app --example with-yarn-workspaces with-yarn-workspaces-app

Deploy it to the cloud with Vercel (Documentation).

Choose packages/web-app as root directory when deploying.