-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Duplicate native binaries? #21
Comments
Thanks for reporting! The Do you know how swc determines which distribution to install? I took a glance at their postinstall script but it wasn't clear to me: https://unpkg.com/@swc/[email protected]/postinstall.js |
swc itself doesn't decide which one to install. Each of the prebuilt binaries have Web Containers emulate Locally, the distinction is made on the basis of getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true |
Thanks for pointing me in the right direction. I don't think there's a bug. Just npm on WebContainers is not on v9.6.5: stackblitz/webcontainer-core#1161 (comment) In the meantime, I can do a pass to remove packages that don't match |
Closing as I fixed this on pkg-size by emulating a However, some packages like esbuild and lightningcss are installing wasm versions in addition to the Linux distribution so there's still some inaccuracy in terms of what should be getting installed. Seems this is WebContainers interfering to patch certain packages: stackblitz/webcontainer-core#281 (comment) Will file an issue for this. Regarding your libc bug, I filed an issue here: |
Problem
Try https://pkg-size.dev/@swc%2Fcore
It loads
@swc/core-linux-x64-musl
as well as@swc/core-linux-x64-gnu
, wrongly indicating that the package size will be over 100MB while installing locally.Expected behavior
Only one of those native deps should be loaded (or filtered out) so that the results are aligned to what one would have locally, instead of what one gets on webcontainers. The install size of
@swc/core
will be less than 50MB.The text was updated successfully, but these errors were encountered: