Skip to content
Avatar of vercelvercel/examples

Monorepo with Turborepo

Learn to implement a monorepo with a single Next.js site that has installed two local packages.

Monorepo with Turborepo

Monorepo

This is a monorepo example with a single Next.js site (./apps/app) that has installed two local packages:

  • ./packages/ui: Exports UI components that use TypeScript and Tailwind CSS and is compiled by SWC.
  • ./packages/utils: Exports utility functions that use TypeScript.

The monorepo is using Turborepo and pnpm workspaces to link packages together.

For more examples on monorepos check out the official Turborepo examples.

Demo

https://solutions-monorepo.vercel.sh

How to Use

You can choose from one of the following two methods to use this repository:

One-Click Deploy

Deploy the example using Vercel:

Clone and Deploy

Execute create-next-app with pnpm to bootstrap the example:

pnpm create next-app --example https://github.com/vercel/examples/tree/main/solutions/monorepo monorepo

Next, run app in development mode:

pnpm dev

The app should be up and running at http://localhost:3000.

Deploy it to the cloud with Vercel (Documentation).

Monorepo with Turborepo
Avatar of vercelvercel/examples

Monorepo with Turborepo

Learn to implement a monorepo with a single Next.js site that has installed two local packages.

Monorepo

This is a monorepo example with a single Next.js site (./apps/app) that has installed two local packages:

  • ./packages/ui: Exports UI components that use TypeScript and Tailwind CSS and is compiled by SWC.
  • ./packages/utils: Exports utility functions that use TypeScript.

The monorepo is using Turborepo and pnpm workspaces to link packages together.

For more examples on monorepos check out the official Turborepo examples.

Demo

https://solutions-monorepo.vercel.sh

How to Use

You can choose from one of the following two methods to use this repository:

One-Click Deploy

Deploy the example using Vercel:

Clone and Deploy

Execute create-next-app with pnpm to bootstrap the example:

pnpm create next-app --example https://github.com/vercel/examples/tree/main/solutions/monorepo monorepo

Next, run app in development mode:

pnpm dev

The app should be up and running at http://localhost:3000.

Deploy it to the cloud with Vercel (Documentation).

Unleash New Possibilities

Deploy your app on Vercel and unlock its full potential