-
Notifications
You must be signed in to change notification settings - Fork 262
Description
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 simple npm 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
- I have run the project in my local machine and I could not reproduce the issue.
Screenshots
No response
Platform
No response
Additional context
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-x64
Is there something swc could do in their postinstall script to play nicely with WebContainers?