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

Investigate replacing react-syntax-highlighter with shiki #29160

Open
Tracked by #29038
JReinhold opened this issue Sep 19, 2024 · 0 comments
Open
Tracked by #29038

Investigate replacing react-syntax-highlighter with shiki #29160

JReinhold opened this issue Sep 19, 2024 · 0 comments

Comments

@JReinhold
Copy link
Contributor

JReinhold commented Sep 19, 2024

react-syntax-hightlighter (and it's subdependencies) takes up a significant amount of the @storybook/core/components bundle:

https://635781f3500dd2c49e189caf-rjflqvpgls.chromatic.com/?path=/story/bench--es-build-analyzer&args=metafile:core_SLASH_components_DOT_esm_DOT_json

image

We should investigate if this can be optimized by moving to Shiki for syntax highlighting. On the surface Shiki doesn't look like a smaller package overall (pkg-size), but it offers fine-grained control of the bundling that might suit our needs.

Shiki also has other advantages in terms of language, perforamcne, theming and API support.

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

No branches or pull requests

1 participant