-
Notifications
You must be signed in to change notification settings - Fork 229
@swc/core installing two distributions #1161
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
Comments
Did some research. There's actually no bug here. npm installs
Currently, all package managers support
However, WebContainers does not have npm v9.6.5 yet. Is there a ballpark timeline for when I can expect npm to be upgraded? As a potential solution on my end, I could either swap npm to use pnpm/yarn. Or perform a post-installation step to remove any packages with |
Hey @privatenumber! Thanks a lot for investigating this. 😃 (Love the links in particular, super useful 🙏) I can't give you a precise timeline yet but we will definitely upgrade npm to the latest version in the next couple of months or so. It might be coming sooner but we're focusing first on other things such as upgrading to node 18. |
Good to know! I'll implement something on my end then. Thanks! |
Describe the bug
When installing
@swc/core
it seems to install two distributions:@swc/core-linux-x64-musl
and@swc/core-linux-x64-gnu
, inflating the install size to 100MB+:https://pkg-size.dev/@swc%2Fcore
I'm wondering if this is a limitation in the environment WebContainers mock, or in swc's postinstall script.
Link to the blitz that caused the error
https://pkg-size.dev/@swc%2Fcore
Sorry, I don't have a Stackblitz reproduction since I wasn't sure how to quickly measure the
node_modules
size but pkg-size.dev does a plain and simplenpm install
on WebContainers.Steps to reproduce
See link
Expected behavior
Locally, when I install
@swc/core
, it's about 35MB.Ideally it just installs one distribution.
Parity with Local
Screenshots
No response
Platform
No response
Additional context
privatenumber/pkg-size.dev#21
As a side, wondering how esbuild's postinstall is executed in WebContainers. It felt like there was some custom logic overwriting it to force install the WASM distribution but I wasn't sure.Seems two distributions are installed too: wasm & linux-x64Is there something swc could do in their postinstall script to play nicely with WebContainers?
The text was updated successfully, but these errors were encountered: