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:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user