Skip to content
Snippets Groups Projects
Commit 11308843 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Switch fabric to a dynamic import

We only need it for the preview, so we can load it in the background
parent 0da6ed2e
Branches
No related tags found
No related merge requests found
......@@ -8,7 +8,6 @@ import {MiniSpinner} from 'vpu-common';
import * as commonUtils from "vpu-common/utils";
import * as commonStyles from 'vpu-common/styles';
import pdfjs from 'pdfjs-dist';
import {fabric} from 'fabric';
const i18n = createI18nInstance();
......@@ -83,7 +82,8 @@ export class PdfPreview extends ScopedElementsMixin(VPULitElement) {
window.addEventListener('resize', this._onWindowResize);
this.updateComplete.then(() => {
this.updateComplete.then(async () => {
const fabric = (await import('fabric')).fabric;
that.canvas = that._('#pdf-canvas');
// this._('#upload-pdf-input').addEventListener('change', function() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment