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

Replace chalk with picocolors #32

Merged
merged 1 commit into from
Dec 20, 2021
Merged

Conversation

TrySound
Copy link
Contributor

This is another take to make vite install size smaller.

Currently vite bundles two instances of chalk. v2 from this package
and v4 in own code.

Both are quite big

https://packagephobia.com/[email protected]
https://packagephobia.com/[email protected]

I suggest to replace it with micropackage which became quite popular
recently

https://packagephobia.com/result?p=picocolors
https://www.npmtrends.com/picocolors

This is another take to make vite install size smaller.

Currently vite bundles two instances of chalk. v2 from this package
and v4 in own code.

Both are quite big

https://packagephobia.com/[email protected]
https://packagephobia.com/[email protected]

I suggest to replace it with micropackage which became quite popular
recently

https://packagephobia.com/result?p=picocolors
https://www.npmtrends.com/picocolors
@haoqunjiang haoqunjiang merged commit f124628 into yyx990803:master Dec 20, 2021
@TrySound TrySound deleted the picocolors branch December 20, 2021 18:56
@TrySound
Copy link
Contributor Author

TrySound commented Dec 20, 2021

@sodatea @yyx990803 Would it be possible to release new version? I want to use it in vite.

@haoqunjiang
Copy link
Collaborator

Yeah, in a few hours.

TrySound added a commit to TrySound/vite that referenced this pull request Dec 21, 2021
See yyx990803/launch-editor#32

Chalk 2 is removed from vite bundle

```
du -ck dist/node
```
before: 12268
after: 12116
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants