

Pnpm workspace monorepo update#
If we need to share types or utilities between the frontend and the backend and we don’t want to duplicate that on both projects, we have to create a third repository for it and then consume it as an external package at both projects.Įach time we modify the shared package, we have to build and publish a new version, and all projects using this package should update it to the newer version. Let’s say we’re building a fullstack application, both the frontend and the backend are two separate projects, each of them placed in a different repository - this is a polyrepo. Monorepos facilitate project management, code sharing, cross-repo changes with instant type-checking validation and more. Monorepo overview What is a monorepoĪ monorepo is a single repository that contains multiple applications and/or libraries. We’ll then build a simple full stack application with React and Node.js using pnpm workspaces and demonstrate how the process can be improved by using Turborepo. In this article, we’ll provide an overview of what monorepos are and what are the benefits of using Turborepo. It has a small learning curve and a low barrier to entry - whether you’re starting out with monorepos or trying different tools in the ecosystem.

It’s fast, easy to configure and use, independent from the application technologies, and can be adopted incrementally. Turborepo is one of the best monorepo tools in the JavaScript/TypeScript ecosystem. Monorepos help managing all those parts together in one repository. It could be types, utilities, validation schemas, components, design systems, development tools setup or configurations. Whether you’re building a fullstack application or an application composed of multiple frontend and backend projects, you’ll probably need to share parts across projects to some extent. Cowritten with Marian Molina - January 20, 2023
