From 8409b5a0543607c0900559832623e7e3ca000f5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Tue, 28 Nov 2023 09:30:39 +0100 Subject: [PATCH] fix: Lazy load viewer component MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- src/viewer.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/viewer.js b/src/viewer.js index 290cabe91d7..b6c43b2cf1b 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -20,7 +20,6 @@ * */ -import ViewerComponent from './components/ViewerComponent.vue' import { logger } from './helpers/logger.js' import { openMimetypesMarkdown, openMimetypesPlainText } from './helpers/mime.js' @@ -33,8 +32,7 @@ if (typeof OCA.Viewer === 'undefined') { OCA.Viewer.registerHandler({ id: 'text', mimes: [...openMimetypesMarkdown, ...openMimetypesPlainText], - // Would be good to be able to lazyload that - component: ViewerComponent, + component: () => import('./components/ViewerComponent.vue'), group: null, theme: 'default', canCompare: true,