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

[Perf] Don't load all languages in the highlight.js plugin #3629

Open
jsulpis opened this issue May 28, 2024 · 0 comments
Open

[Perf] Don't load all languages in the highlight.js plugin #3629

jsulpis opened this issue May 28, 2024 · 0 comments

Comments

@jsulpis
Copy link

jsulpis commented May 28, 2024

Hi,
I noticed that the highlight.js plugin loads all languages by default:

import hljs from 'highlight.js';

The full script is huge, 287.4kB minzipped.

The highlight.js doc suggests to include only the languages needed instead. Maybe with the require syntax the plugin could take an optional parameter to include only specific languages ?
image

This would be a huge performance gain for all users of the plugin.

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