Skip to content

Example project on how to setup a monorepo that works for Next Js and Zeit now

Notifications You must be signed in to change notification settings

fatlinesofcode/yarn-workspaces-next-now-monorepo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yarn workspaces example

Updated to include Now examples for routing with multiple Next.js apps

How to use

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

The idea behind the example

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

Useful Links

About

Example project on how to setup a monorepo that works for Next Js and Zeit now

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published