by random_kris · 3y ago · 0 comments
1st It caches node modules making it faster and space efficient
2nd It creates a root node-modules and then a node-module for each sub package. Which makes it much easier to work with monorepo packages. With a single node-modules you can accidently import packages that your package doesn't declare in package.json
pnpm's use of hard links is so perfect for monorepos. As far as your code knows they just have a normal, run of the mill node_modules but without the massive hit on speed and disk space.