pnpm's experimental global virtual store Without the global virtual store, each worktree would have its own .pnpm virtual store inside node_modules, with hardlinks or copies of every package. With enableGlobalVirtualStore: true, pnpm keeps all package contents in a single shared directory (the global store, which you can find by running pnpm store path), and each worktree's node_modules contains symlinks pointing there: your-monorepo/ (bare git repo) > main/ (worktree: main branch) >> packages/ >> node_modules/ >>> lodash → <global-store>/links/@/lodash/... >>> express → <global-store>/links/@/express/... > feature-auth/ (worktree: feat/auth branch) >> node_modules/ >>> lodash → <global-store>/links/@/lodash/... ← same target >>> express → <global-store>/links/@/express/... > fix-api/ (worktree: fix/api-error branch) >> node_modules/ >>> lodash → <global-store>/links/@/lodash/... ← same target >>> express → <global-store>/links/@/express/...
@pnpm.io's experimental global virtual store is brilliant. The install performance gains are a game-changer for git flows. You get near-zero per-worktree overhead and instant installs for new worktrees as packages are already in the global store. @kochan.io can't stop making pnpm better 🤌