hedgedoc/public/js
David Mehren 7ff685933e
Lazy-load highlight.js
This commit moves the import of highlight.js into a `require.ensure`
block, that is only executed when a code-block is actually present
in a note. Webpack automatically splits the library into a separate
chunk and loads that on demand.

The call to `hljs.listLanguages()` in `index.js` is also replaced
by a static list. This is important, as `index.js` would otherwise
need to import highlight.js, which would cause the quite big
library to be included into nearly every entrypoint, needlessly
increasing the transferred code size.

Signed-off-by: David Mehren <git@herrmehren.de>
2021-06-11 09:29:27 +02:00
..
lib Load inline-attachment without script-loader 2021-06-07 20:59:35 +02:00
cover.js
extra.js Lazy-load highlight.js 2021-06-11 09:29:27 +02:00
history.js
htmlExport.js
index.js Lazy-load highlight.js 2021-06-11 09:29:27 +02:00
locale.js
mathjax-config-extra.js
pretty.js
render.js
reveal-markdown.js
slide.js
utils.js