Hacker News new | ask | show | jobs
by random_kris 994 days ago
I prefer pnpm for monorepos

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

3 comments

Second this.

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.

I never got the chance to use pnpm. I try to stick to “official” tools. But it sounds interesting, so I’ll check it
I just wish it could move node modules somewhere else. The cache hits the disk so hard my PV falls over.