Skip to content

Commit 0c8be7e

Browse files
authored
Merge pull request #4684 from nextcloud/backport/4680/stable30
[stable30] feat: load viewer componenty asynchronously to reduce file size
2 parents 9853b7a + 81f76b1 commit 0c8be7e

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)