antfu-collective / taze

🥦 A modern cli tool that keeps your deps fresh
MIT License
2.83k stars 86 forks source link

chore(build): bundle a few deps #109

Closed SukkaW closed 6 months ago

SukkaW commented 6 months ago

Description

@npmcli/config and npm-registry-fetch significantly contribute to the installation size of taze. We can mitigate this by bundling them.

As previously discussed, unbuild struggles to bundle these dependencies when they are directly imported. However, I discovered that unbuild can easily handle these dependencies when they are dynamically imported.

This PR could potentially reduce the installation size by an additional 35% or possibly even more.

Linked Issues

N/A

Additional context

The final dist size is 1.5 MiB:

image
SukkaW commented 6 months ago
image

We did it again! That's another 50% reduction of the installation size!