Skip to content

Next.js multi-zones site demo for concurrent local dev

License

Notifications You must be signed in to change notification settings

dpidan/nextjs-multizones

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Next.js Multi Zones Demo

An example of a Next.js Multi Zones site in a monorepo using TurboRepo to concurrently build and run. Includes custom Link component to strip basePath from hrefs that may come from shared sources.

Requirements

  • Node.js >=12
  • Yarn 1 (for monorepo workspace support)

This uses Next.js v.10 to test backward-compatibility.

Installation

yarn

Development

Using Next.js's rewrites and internal proxy:

yarn dev

This runs the root dev script ($ yarn turbo run dev) which will start and concurrently run all apps and libraries in dev/watch mode.

Using a Node.js proxy wrapper app:

yarn dev:proxy

Visit http://localhost:3000

Build

yarn build

To Do

  • Provide custom Router and useRouter to handle stripping of basePath from shared links.
  • *See various TODOs in code

About

Next.js multi-zones site demo for concurrent local dev

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published