Skip to content

Commit

Permalink
fix: Lazy load viewer component
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr committed Nov 29, 2023
1 parent 8da8c40 commit 8409b5a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
*
*/

import ViewerComponent from './components/ViewerComponent.vue'
import { logger } from './helpers/logger.js'
import { openMimetypesMarkdown, openMimetypesPlainText } from './helpers/mime.js'

Expand All @@ -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,
Expand Down

0 comments on commit 8409b5a

Please sign in to comment.