4 ms·
pnpm tries to be a drop-in replacement for npm, and dedupes automatically.
by zamalek 2y ago
pnpm tries to be a drop-in replacement for npm, and dedupes automatically.
- diggan 2y ago> pnpm tries to be a drop-in replacement for npm True > and dedupes automatically Also true. But the way you put them after each other, makes it sound like npm does de-duplication, and since pnpm tries to be a drop-in replacement for npm, so does pnpm. So for clarification: npm doesn't do de-duplication across all your projects, and that in particular was of the more useful features that pnpm brought to the ecosystem when it first arrived.
- MrJohz 2y agoMore importantly, pnpm installs packages as symlinks, so the deduping is rather more effective. I believe it also tries to mirror the NPM folder structure and style of deduping as well, but if you have two of the same package installed anywhere on your system, pnpm will only need to download and save one copy of that package.
- spankalee 2y agonpm's --install-strategy=linked flag is supposed to do this too, but it has been broken in several ways for years.