mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 22:54:42 -04:00
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:
parent
4f4a4cb747
commit
bd62e79f7d
4 changed files with 27 additions and 11 deletions
|
@ -1,7 +1,7 @@
|
|||
/* eslint-env browser, jquery */
|
||||
/* eslint no-console: ["error", { allow: ["warn", "error", "debug"] }] */
|
||||
/* global Cookies, moment, serverurl,
|
||||
key, Dropbox, ot, hex2rgb, Visibility */
|
||||
key, Dropbox, hex2rgb, Visibility */
|
||||
|
||||
import TurndownService from 'turndown'
|
||||
import CodeMirror from 'codemirror/lib/codemirror.js'
|
||||
|
@ -13,6 +13,8 @@ import Idle from 'Idle.Js'
|
|||
|
||||
import '../vendor/jquery-textcomplete/jquery.textcomplete'
|
||||
|
||||
import { ot } from '../vendor/ot/ot.min.js'
|
||||
|
||||
import { saveAs } from 'file-saver'
|
||||
import randomColor from 'randomcolor'
|
||||
import store from 'store'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue