Courses / Monorepo Tooling
3. Yarn workspaces
Yarn's workspace feature for hoisting and linking packages within a monorepo.
JavaScript
Yarn workspaces
A Yarn workspace is a monorepo feature that hoists and links multiple packages so they share dependencies and resolve imports locally.
"I want one repo for many packages and to avoid installing duplicate node_modules everywhere."
Yarn workspaces let multiple packages in one repository declare dependencies that Yarn will install once (hoisted) and link together so internal packages can require each other by name.
"I want one repo for many packages and to avoid installing duplicate node_modules everywhere."
Yarn workspaces let multiple packages in one repository declare dependencies that Yarn will install once (hoisted) and link together so internal packages can require each other by name.