ds300 / patch-package

Fix broken node modules instantly 🏃🏽‍♀️💨
MIT License
10.17k stars 283 forks source link

[Proposal] Reduce `patch-package` installation size #499

Open SukkaW opened 8 months ago

SukkaW commented 8 months ago

The installation size of the patch-package is reaching 2.33 MiB:

image

(https://packagephobia.com/result?p=patch-package)

And here is the current npm dependency graph of the patch-package:

https://npmgraph.js.org/?q=patch-package#zoom=w

image

I am wondering if we can reduce the installation size. And here is what I propose:

Together we can reduce the installation size of the patch-package by 470 KiB.

@ds300 What do you think?

sesm commented 8 months ago

I thought picocolors was a joke in response to nanocolors drama, but apparently it's now used by the author of nanocolors in his projects (yes, all 3 projects you mentioned above have the same author, so it's just a personal preference, not a statistic). Anyway, why not colorette? (the project from which nanocolors was originally copied)

SukkaW commented 8 months ago

Anyway, why not colorette? (the project from which nanocolors was originally copied)

The installation size of the colorette (17 KiB) is 3x of picocolors (5.66 KiB) while only 7% faster (https://www.npmjs.com/package/colorette?activeTab=readme#benchmarks). So I'd still prefer picocolors.