Skip to content
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

published transformer-js package contains 150MiB of swc binaries #8995

Open
legobeat opened this issue May 9, 2023 · 5 comments
Open

published transformer-js package contains 150MiB of swc binaries #8995

legobeat opened this issue May 9, 2023 · 5 comments

Comments

@legobeat
Copy link
Contributor

legobeat commented May 9, 2023

🐛 bug report

As of @parcel/[email protected] (ba57b65), the published npm package contains prebuilt swc binaries for 8 platforms. In the latest version of the package, these add up to 150 MiB.

I tried searching for mentions of this being a conscious decision but coming up short, this issue asks if there are changes that can be done in bundling to bring the installation size of this package down.

4.0K	package/LICENSE
4.0K	package/native-browser.js
4.0K	package/native.js
4.0K	package/package.json
40K	package/src
48K	package/lib
17M	package/parcel-swc.linux-arm-gnueabihf.node
18M	package/parcel-swc.darwin-arm64.node
18M	package/parcel-swc.linux-arm64-gnu.node
18M	package/parcel-swc.linux-arm64-musl.node
19M	package/parcel-swc.darwin-x64.node
20M	package/parcel-swc.linux-x64-musl.node
21M	package/parcel-swc.linux-x64-gnu.node
23M	package/parcel-swc.win32-x64-msvc.node

🤔 Expected Behavior

I can use have a bunch of isolated gatsby environments checked out side-by-side an a consumer-grade laptop.

😯 Current Behavior

The node_modules directories fill up the disk quickly.

💁 Possible Solution

Build locally (node-gyp approach) as lifecycle script?

@mischnic
Copy link
Member

mischnic commented May 9, 2023

Yes, this should be fixed.

Build locally (node-gyp approach) as lifecycle script?

We should do the same as swc/lightningcss/esbuild: one npm package per platform as optionalDependencies: https://unpkg.com/browse/[email protected]/package.json

@legobeat
Copy link
Contributor Author

legobeat commented Nov 6, 2023

Not stale

@github-actions github-actions bot removed the Stale Inactive issues label Nov 6, 2023
@ankurparihar
Copy link

yeah, this is huge file, which is causing problems when doing npm i from our self hosted artifactory, please resolve this, open to contribute if someone can mentor.

~/workspace $ du -h package
44K package/lib
36K package/src
137M package
~/workspace $ du -h trans.tgz
44M trans.tgz

@github-actions github-actions bot added the Stale Inactive issues label Jul 10, 2024
@legobeat
Copy link
Contributor Author

bump

@github-actions github-actions bot removed the Stale Inactive issues label Jul 10, 2024
@github-actions github-actions bot added the Stale Inactive issues label Jan 7, 2025
@ankurparihar
Copy link

bump

@github-actions github-actions bot removed the Stale Inactive issues label Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants