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

fix: lazy-load grammars for syntax-highlighting #2

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

stefanprobst
Copy link
Contributor

currently, there is a noticable delay when initially loading an mdx-rendered page, because the shiki syntax highlighter is initializing all supported grammars.

this pr makes shiki load grammars lazily on demand.

@stefanprobst stefanprobst requested a review from babslgam January 11, 2025 15:46
@babslgam babslgam merged commit 47a3972 into main Jan 13, 2025
3 checks passed
@babslgam babslgam deleted the fix/shiki-languages branch January 13, 2025 13:30
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