Skip to content
Back to blog

Share packages in a Turborepo monorepo

February 10, 2022

Share packages in a Turborepo monorepo

Key takeaways

This guide targets Turborepo and turborepo npm searches with a practical model for sharing code across apps.

  • >Move shared code into internal packages.
  • >Configure workspace dependencies and build scripts.
  • >Avoid cycles and fragile imports between applications.

Quick FAQ

When should a monorepo use a shared package?

Create a package when several apps consume the same contract, component, or helper with a shared lifecycle.

Does Turborepo replace npm workspaces?

No. Turborepo orchestrates tasks; workspaces resolve and link packages.

Book a call