Reputation: 119
I'm really frustrated by the size of node_modules folder that gets created every time for every project. So, I've been looking for some time-space saving solutions. And I found PNPM ( https://pnpm.js.org/ ) , Yarn ( https://yarnpkg.com/ ) and Pkglink ( https://github.com/jeffbski/pkglink ). But I'm not sure which is better to serve my purpose.
Things I'm looking forward to solving:
Looking for experts advice.
Upvotes: 2
Views: 882
Reputation: 7706
I think pnpm is satisfying all your requirements.
pnpm will only save a package once on a disk, and it will use hard links to add the package to different projects on the disk.
You could achieve the same with Yarn+pkglink or npm+pkglink but that would be a two-step process. First, you'd run npm|yarn install then pkglink to remove the duplicates.
Upvotes: 3