Skip to content

Commit c6e53ca

Browse files
authored
Merge pull request #26 from privy-open-source/fix/import-lib-on-newest-nuxt
Fix Import Issues for CommonJS Modules on Newest Nuxt
2 parents 7240806 + 51e18f9 commit c6e53ca

File tree

3 files changed

+5
-12
lines changed

3 files changed

+5
-12
lines changed

src/components/pdf-object/utils/use-drop.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ export default function useDrop(target: Ref<HTMLElement>, dropTarget: Ref<string
2121
destroy()
2222

2323
if (target.value) {
24-
const { default: Interact } = await import('interactjs')
24+
const Interact = (await import('interactjs')).default
2525

26-
// Interact.dynamicDrop(true)
26+
Interact.dynamicDrop(true)
2727

2828
instance.value = Interact(dropTarget.value, { context: target.value }).dropzone({
2929
accept: '.pdf-object',

src/components/pdf-viewers/PdfNavigation.vue

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -114,19 +114,10 @@ export default defineComponent({
114114
cursor: pointer;
115115
}
116116
117-
.pdf-zoom-out {
118-
margin-top: 6px;
119-
}
120-
.pdf-zoom-in {
121-
margin-top: 6px;
122-
}
123-
124117
.pdf-prev {
125-
margin-top: 6px;
126118
margin-left: 5px;
127119
}
128120
.pdf-next {
129-
margin-top: 6px;
130121
margin-left: 10px;
131122
}
132123

src/components/pdf-viewers/utils/use-viewer.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,12 @@ export function useViewer(container: Ref<HTMLDivElement>, viewer: Ref<HTMLDivEle
9393

9494
async function initPdfViewer() {
9595
if (typeof navigator !== 'undefined' && container.value && viewer.value) {
96-
const { NullL10n, PDFLinkService, PDFViewer, EventBus } = await import(
96+
const viewerLib = await import(
9797
'pdfjs-dist/web/pdf_viewer'
9898
)
9999

100+
const {NullL10n, PDFLinkService, PDFViewer, EventBus } = viewerLib.default
101+
100102
const bus = new EventBus()
101103

102104
bus.on('pagesinit', () => {

0 commit comments

Comments
 (0)