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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce bundle size of @babel/codeframe
#14213
Comments
Hey @TimvdLippe! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly. If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite. |
We can consider it to Babel 8, comparing it to updating chalk from v2 to v5. |
Uh, apparently we export a whole We cannot remove chalk until Babel 8, even if we find a library that supports Node.js 6. |
right - now that you mention it... I remembered seeing that in code last time I investigated... was the reason I did not even open an issue to discuss it back then, as I figured it will never happen 馃檲. too bad... 馃槶 |
https://github.com/alexeyraspopov/picocolors has enough node support as already used by browserslist the dependency of babel. There is also a shim for browsers which may simplify bundling. UPD: Ouch, missed the comment about exported chalk. Anyway migrating to picocolors in v8 would reduce bundle size. |
anything that is less than let's say 5kB would be an improvement 馃憤 |
馃捇
What problem are you trying to solve?
Reduce the bundle size of projects that depend on
@babel/codeframe
Describe the solution you'd like
We are working on reducing the bundle size of Prettier, tracked in prettier/prettier#12144
In prettier/prettier#12144 (comment) @daKmoR suggested to switch Chalk in
@babel/codeframe
to colorette, which should reduce the size of the package by 19kB (as Chalk pulls in 20kB and colorette is 1kB)Can we remove large dependencies from
@babel/codeframe
and reduce its disk footprint?Describe alternatives you've considered
Keep Chalk and keep a large bundle
Documentation, Adoption, Migration Strategy
No response
The text was updated successfully, but these errors were encountered: