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

@@ -133,7 +133,7 @@
"url": "https://shivering-isles.com"
},
{
"name":"David Mehren",
"name": "David Mehren",
"email": "hedgedoc@herrmehren.de"
}
],
@@ -163,6 +163,7 @@
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "5.1.0",
"eslint-plugin-standard": "4.1.0",
"exports-loader": "1.1.1",
"expose-loader": "1.0.3",
"file-loader": "6.2.0",
"file-saver": "2.0.5",