-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
20 times faster installation times #669
Comments
Interesting idea. I will think about it. |
What exactly is done? @jantimon |
@njfamirm from the ncc readme on github https://github.com/vercel/ncc
In my experiment It also minifies the code: The very same would probably be possible with esbuild (see https://esbuild.github.io/getting-started/#bundling-for-node) but might require a little bit more configuration. I am not sure what you mean with "What exactly is done?" Currently the experiment supports the following cases: npx zx-packed your script npm i -g zx-packed
zx your-script.js it also works with a shebang: #!/usr/bin/env zx
// ... it also works if you import it: import "zx-packed";
// ... typescript typings are also supported: repl works too: |
Thank you for your complete explanation ❤️ @jantimon In my opinion and according to the searches I did, |
The side question I have is where do you get such a screenshot ? |
Another thing is zx/glovals endpoint. |
Right now However that could be easily changed and it is already possible with a less pretty import path: @njfamirm screenshots were taken with https://cleanshot.com/ |
I didn't fully understand |
@antonmedv - I just released a new version: 0.0.8 both ways are now fully supported - named and global usage: @antonmedv I switched to esbuild which solved a ncc issue but created other issues :) Unfortunately it was necessary to patch https://github.com/jantimon/zx-packed/blob/main/patches/zx%2B7.2.3.patch A fresh version can be found here:
Using esbuild further reduced the file size from:
|
Seems covered by #722 |
last week I created an experiment for
zx
, which might be interesting for youmy experiment is an optimized node bundle of
zx
created using the Vercelncc
compiler, offering significant size reduction from 13mb (incl dependencies) to 450kb (with 0 dependencies).du -sh node_modules
you can find it on GitHub here and on npm here
a lot of users of
zx
will probably prefer to use a non bundle package but still I would love to know what you think :)The text was updated successfully, but these errors were encountered: