Load ot without script-loader

The ot library is tricky to load with Webpack, as it writes
it's functions into a global `ot` object and does not export anything.
I got it working using `exports-loader` to put the `ot` object
into a CommonJS export and then forcing Webpack to only
load using CommonJS.

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren
2021-06-06 18:17:52 +02:00
parent 4f4a4cb747
commit bd62e79f7d
4 changed files with 27 additions and 11 deletions

View File

@@ -568,7 +568,6 @@
"Idle.Js@git+https://github.com/shawnmclean/Idle.js":
version "0.0.1"
uid db9beb3483a460ad638ec947867720f0ed066a62
resolved "git+https://github.com/shawnmclean/Idle.js#db9beb3483a460ad638ec947867720f0ed066a62"
JSV@^4.0.x:
@@ -2276,7 +2275,6 @@ code-point-at@^1.0.0:
"codemirror@git+https://github.com/hedgedoc/CodeMirror.git":
version "5.58.2"
uid f780b569b3717cdff4c8507538cc63101bfa02e1
resolved "git+https://github.com/hedgedoc/CodeMirror.git#f780b569b3717cdff4c8507538cc63101bfa02e1"
collection-visit@^1.0.0:
@@ -3287,7 +3285,6 @@ detect-libc@^1.0.2:
"diff-match-patch@git+https://github.com/hackmdio/diff-match-patch.git":
version "1.1.1"
uid c2f8fb9d69aa9490b764850aa86ba442c93ccf78
resolved "git+https://github.com/hackmdio/diff-match-patch.git#c2f8fb9d69aa9490b764850aa86ba442c93ccf78"
diff@5.0.0:
@@ -3973,6 +3970,15 @@ expand-range@^1.8.1:
dependencies:
fill-range "^2.1.0"
exports-loader@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/exports-loader/-/exports-loader-1.1.1.tgz#88c9a6877ee6a5519d7c41a016bdd99148421e69"
integrity sha512-CmyhIR2sJ3KOfVsHjsR0Yvo+0lhRhRMAevCbB8dhTVLHsZPs0lCQTvRmR9YNvBXDBxUuhmCE2f54KqEjZUaFrg==
dependencies:
loader-utils "^2.0.0"
schema-utils "^3.0.0"
source-map "^0.6.1"
expose-loader@1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/expose-loader/-/expose-loader-1.0.3.tgz#5686d3b78cac8831c4af11c3dc361563deb8a9c0"
@@ -5611,7 +5617,6 @@ js-cookie@2.2.1:
"js-sequence-diagrams@git+https://github.com/hedgedoc/js-sequence-diagrams.git":
version "2.0.1"
uid bda0e49b6c2754f3c7158b1dfb9ccf26efc24b39
resolved "git+https://github.com/hedgedoc/js-sequence-diagrams.git#bda0e49b6c2754f3c7158b1dfb9ccf26efc24b39"
dependencies:
lodash "4.17.x"
@@ -6197,7 +6202,6 @@ lutim@^1.0.2:
"lz-string@git+https://github.com/hackmdio/lz-string.git":
version "1.4.4"
uid efd1f64676264d6d8871b01f4f375fc6ef4f9022
resolved "git+https://github.com/hackmdio/lz-string.git#efd1f64676264d6d8871b01f4f375fc6ef4f9022"
make-dir@^1.0.0:
@@ -6506,7 +6510,6 @@ messageformat@^2.3.0:
"meta-marked@git+https://github.com/hedgedoc/meta-marked":
version "0.4.5"
uid "3002adae670a6de0a845f3da7a7223d458c20d76"
resolved "git+https://github.com/hedgedoc/meta-marked#3002adae670a6de0a845f3da7a7223d458c20d76"
dependencies:
js-yaml "~4.1.0"