File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 33
44import Prism from 'prismjs'
55import hljs from 'highlight.js'
6- import PDFObject from 'pdfobject'
6+ // Fix PDFObject import to work with both dev and prod builds
7+ import * as PDFObjectModule from 'pdfobject'
8+
79import { saveAs } from 'file-saver'
810
911import escapeHTML from 'lodash/escape'
@@ -65,6 +67,8 @@ import { instance as vizInstance } from '@viz-js/viz'
6567let viz = null
6668vizInstance ( ) . then ( instance => { viz = instance } )
6769
70+ const PDFObject = PDFObjectModule . default || PDFObjectModule
71+
6872const ui = getUIElements ( )
6973
7074// auto update last change
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ import '@hackmd/ot/lib/undo-manager'
102102// import '@hackmd/ot/lib/client'
103103import '@hackmd/ot/lib/editor-client'
104104
105- import mousewhell from 'jquery-mousewheel'
105+ import * as mousewheel from 'jquery-mousewheel'
106106import '@vendor/jquery-textcomplete/jquery.textcomplete'
107107import '@vendor/jquery-ui/jquery-ui.min.js'
108108import '@vendor/bootstrap/tooltip.min.js'
@@ -226,7 +226,8 @@ import '@css/extra.css'
226226import '@css/site.css'
227227import 'spin.js/spin.css'
228228
229- mousewhell ( $ )
229+ const mw = mousewheel . default || mousewheel // Fix for mousewheel import
230+ mw ( $ )
230231
231232// ot.Client = Client
232233// ot.EditorClient = EditorClient
You can’t perform that action at this time.
0 commit comments