-
Notifications
You must be signed in to change notification settings - Fork 30
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
Provide ability to tree-shake parsers. #215
Comments
Hi @bheston, it would indeed be a nice thing to figure out, but I don’t see a solution given the current way things are organized. In the meantime, if minimal payload is crucial, it may be worth experimenting with build-time optimizations such as using import maps (or other bundler features such as Rollup Transformers) to replace the content of |
Thanks. Yeah, I didn't see a good way to handle it either. I was considering copying and modifying the modeRgb definition to remove the reference to parseNamed and then only use my local definition. It seems like that would work, though runs the risk of getting out of sync. I wonder if all of the I recently came across this which I think is a similar idea: https://github.com/antfu/shikiji?tab=readme-ov-file#fine-grained-bundle |
Overall I'm good with the size of the library when I shake out the modes I don't need. CSS named colors are not very useful though, and really that's the only other thing I'd like to shake out. Can we opt-in to named color parsing? I suspect a lot of people are only dealing with hex values for modern experiences.
The text was updated successfully, but these errors were encountered: