Open TylerLeonhardt opened 2 years ago
Hey @TylerLeonhardt !
Thank you for your suggestion, I didn't know about the existence of prebuildify
. Looking at the prebuild-install
link you provided, it mentions this downside:
The installed npm package is larger on disk. Using Node-API alleviates this because Node-API binaries are runtime-agnostic and forward-compatible.
If I understand this correctly, you get rid of the 759KB from prebuild-install
… but will get new binaries of keytar that you might or might not need. Looking at the latest release of keytar
we're talking about ~800KB that outweigh the 759KB from prebuild-install
.
Is that correct? Or will your bundler get rid of the binaries that aren't needed? 🤔
In case my reasoning is wrong and this change is actually worth doing, we can't promise any ETA 😢 Right now keytar is being maintained by the GitHub Desktop team, which is quite small. We definitely accept contributions to the repository, but one idea I discussed with one of your teammates a few months ago was transferring ownership of keytar to the VS Code team, since it was kind of a core dependency to you.
Also see benefits as outlined by @vweevers in https://github.com/atom/node-keytar/issues/255#issuecomment-598727183
Summary
prebuild-install
is recommending:Right now,
prebuild-install
installs 759KBs ofnode_modules
none of which need to ship in our product becausekeytar
is standalone AFAICT.Motivation
We, in vscode, are trying to slim down the size of the package and because of
prebuild-install
we are introducing 759kbs of stuff that isn't used at all.Describe alternatives you've considered
In vscode we have considered installing
keytar
to a separate location and then copying the files over to our build to slim down our package but it would be nice ifkeytar
followed the recommendation here byprebuild
which, in theory, will slim down the build.Additional context