-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Request] Build minimal target (i.e. no languages) on CDNs too #3034
Comments
The website only has 10.5... not sure why 10.6 didn't get published. Tracking that down now. Thanks for bringing that to our attention. Once the latest version is on there then I'm going to close this as a duplicate of #2846. The lack of discussion there shows me this is not a critical issue to most people. I think the current feeling is that our default common build (41kb gzipped) is "small enough" for most common uses (and getting smaller with version 11) and that it's easy enough to build a more minimal target for truly specialized cases than need something smaller. IE, our current build already qualifies as a "minimal distribution", just not the MOST minimal. That said, we may end up here eventually anyways thanks to #2600 - so keep an eye on that and v11. Although I suppose that might only apply to people using the npm modules in the browser via modules - I'm not sure we'll add another file to our CDN build. |
It's also (currently) easy to just use any old text editor to "trim the fat" from our default distribution as well... it's just a concatenation of core + common grammars. |
Pushed 10.6 to the website. |
Is your request related to a specific problem you're having?
I'd like a minimal distribution. So what I want is to have language detection via hljs on the server, but a full build is 1MB which I'd imagine would be terrible for clientside load times, so my plan is to send just a minimal distribution and the one language that's needed for the specific page being requested.
The solution you'd prefer / feature you'd like to see added...
A target with no languages.
Any alternative solutions you considered...
None; I've already built the minimal target myself. Note that going to the website and deselecting appears to not work with the current (?) API since it lacks
highlightAll
among possibly other differences (It's also 15k instead of the current 20k).Additional context...
None needed, I believe
The text was updated successfully, but these errors were encountered: