summaryrefslogtreecommitdiffstats
path: root/package.json
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2020-04-13 15:02:31 +0200
committerGitHub <noreply@github.com>2020-04-13 16:02:31 +0300
commit27e3cddfbef533f783898800ac4abdd5a453b436 (patch)
tree1ba9f63c9fac2f06549a28e043c3669042cf9ced /package.json
parentcc4da79fb6302f35dfe9e2d5af7cda384083b0af (diff)
downloadgitea-27e3cddfbef533f783898800ac4abdd5a453b436.tar.gz
gitea-27e3cddfbef533f783898800ac4abdd5a453b436.zip
Move syntax highlighting to web worker (#11017)
This should eliminate page freezes when loading big files/diff. `highlightBlock` is needed to preserve existing nodes when highlighting and for that, highlight.js needs access to the DOM API so I added a DOM implementation to make it work, which adds around 300kB to the output file size of the lazy-loaded `highlight.js`. Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'package.json')
-rw-r--r--package.json4
1 files changed, 3 insertions, 1 deletions
diff --git a/package.json b/package.json
index abb04356a2..88360b6b6f 100644
--- a/package.json
+++ b/package.json
@@ -17,6 +17,7 @@
"core-js": "3.6.4",
"css-loader": "3.4.2",
"cssnano": "4.1.10",
+ "domino": "2.1.4",
"dropzone": "5.7.0",
"fast-glob": "3.2.2",
"fomantic-ui": "2.8.4",
@@ -44,7 +45,8 @@
"vue-template-compiler": "2.6.11",
"webpack": "4.42.0",
"webpack-cli": "3.3.11",
- "webpack-fix-style-only-entries": "0.4.0"
+ "webpack-fix-style-only-entries": "0.4.0",
+ "worker-loader": "2.0.0"
},
"devDependencies": {
"eslint": "6.8.0",