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

Big Bundle Size from highlight.js #39

Open
joehand opened this issue Jul 6, 2016 · 3 comments
Open

Big Bundle Size from highlight.js #39

joehand opened this issue Jul 6, 2016 · 3 comments

Comments

@joehand
Copy link
Contributor

joehand commented Jul 6, 2016

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.

@sethvincent
Copy link
Collaborator

Wow, that is way too big! I'll check it out.

@joehand
Copy link
Contributor Author

joehand commented Jul 6, 2016

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.

@freeman-lab
Copy link
Owner

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.

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

3 participants