Skip to content

Commit 81f76b1

Browse files
elzodybackportbot[bot]
authored andcommitted
feat: load viewer componenty asynchronously to reduce file size
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
1 parent 9853b7a commit 81f76b1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/viewer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ import '../css/filetypes.scss'
88

99
import { getCapabilities } from './services/capabilities.ts'
1010
import { autoSetupBuiltInCodeServerIfNeeded } from './services/builtInCode.ts'
11-
import Viewer from './view/Viewer.vue'
1211

1312
const supportedMimes = getCapabilities().mimetypes
13+
const AsyncViewerComponent = () => import('./view/Viewer.vue')
1414

1515
if (OCA.Viewer) {
1616
OCA.Viewer.registerHandler({
1717
id: 'richdocuments',
1818
group: null,
1919
mimes: supportedMimes,
20-
component: Viewer,
20+
component: AsyncViewerComponent,
2121
theme: 'default',
2222
canCompare: true,
2323
})

0 commit comments

Comments
 (0)