bun
bun copied to clipboard
More space efficient, package manager
What is the problem this feature will solve?
Big node_module folder.
What is the feature you are proposing to solve the problem?
A similar approach to package management to pnpm. That could, probably, make bun even faster installing packages.
What alternatives have you considered?
No response
It would definitely make it slower at installing.
It's something worth considering nonetheless, though I think there are better paths forward if willing to have an install mode that only maintains compatibility with Bun's runtime.
Specifically, I think it'd be interesting to just have a map of package names & versions to file paths. Then, you only have one version of a package installed on disk, without creating symlinks matching the hacky directory structure of node's module resolver implementation. The downside to an approach like this would be packages cannot edit the files
It would definitely make it slower at installing.
Surely creating a symlink is faster than copying files?.
Using pnpm
for me is way faster than npm
for this very reason. And of course the disk savings are a bonus.
Saying this, isn't node module resolution backwards compatible in bun anyway, so there is no problems using pnpm
and bun
together, because workspace support is something I could not do without too.
i need it too
Disk space efficiency is at the same level of fast/speed. It's a great feature to consider. I'd love to fully migrate from pnpm
to bun
if we consider disk space also. My current solution using pnpm
+ bun is once in a while, I run npkill
.
UPDATE 1: I found out here, it only affects macOS users. While Linux users use hardlink
, it's fast and storage-friendly. Now, I want to experiment with Linux on macOS using OrbStack
UPDATE 2: I tested using bun 0.7.3 in Debian (bookworm, arm64) on macOS 14, and it seems the node_modules
are still as heavy as black holes like npm. I decided to use pnpm
locally, and for deployment (users love blazingly fast response) I'm using bun
.