minidocs
minidocs copied to clipboard
Big Bundle Size from highlight.js
The bundle size right now is 1.4MB, 581 KB gzipped, for a fairly simple docs site (docs.dat-data.com). It looks like most of that is because all of the 175 (very obscure) highlight.js languages are included in the bundle.
Can we remove the non-common language highlights from the bundle?
Or if not, can we add an option to output a static site without the bundle? For a small static docs site, it doesn't seem like client side routing is worth such a large initial download. I'd rather just have static html.
Wow, that is way too big! I'll check it out.
What if you do markdown/highlight parsing on the server and put the HTML in the bundle? That will allow you to remove all the highlight.js and markdown libraries from the bundle.
Yeah wow, thanks for flagging @joehand ! In the very short term, we should definitely at least remove most the non-common language highlights. And I also like the more general solution for moving forward.