File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 */
55
66import { emit , subscribe } from '@nextcloud/event-bus'
7- import Vue from 'vue'
7+ import Vue , { defineAsyncComponent } from 'vue'
88import {
99 ATTACHMENT_RESOLVER ,
1010 EDITOR_UPLOAD ,
@@ -265,10 +265,10 @@ window.OCA.Text.createEditor = async function ({
265265 onSearch = undefined ,
266266 onAttachmentsUpdated = ( { attachmentSrcs } ) => { } ,
267267} ) {
268- const { default : MarkdownContentEditor } = await import (
269- './components/Editor/MarkdownContentEditor.vue'
268+ const MarkdownContentEditor = defineAsyncComponent (
269+ ( ) => import ( './components/Editor/MarkdownContentEditor.vue' ) ,
270270 )
271- const { default : Editor } = await import ( './components/Editor.vue' )
271+ const Editor = defineAsyncComponent ( ( ) => import ( './components/Editor.vue' ) )
272272
273273 const data = Vue . observable ( {
274274 readonlyBarProps : readonlyBar . props ,
@@ -365,8 +365,8 @@ window.OCA.Text.createTable = async function ({
365365 onLoaded = ( ) => { } ,
366366 onUpdate = ( { markdown } ) => { } ,
367367} ) {
368- const { default : PlainTableContentEditor } = await import (
369- './components/Editor/PlainTableContentEditor.vue'
368+ const PlainTableContentEditor = defineAsyncComponent (
369+ ( ) => import ( './components/Editor/PlainTableContentEditor.vue' ) ,
370370 )
371371
372372 const data = Vue . observable ( {
Original file line number Diff line number Diff line change @@ -14,9 +14,10 @@ const openReadOnlyEnabled = loadState('text', 'open_read_only_enabled')
1414
1515document . addEventListener ( 'DOMContentLoaded' , async ( ) => {
1616 if ( workspaceAvailable && window . OCA . Files ?. Settings ) {
17- const { default : Vue } = await import ( 'vue' )
18- const { default : FilesSettings } = await import ( './views/FilesSettings.vue' )
19-
17+ const { default : Vue , defineAsyncComponent } = await import ( 'vue' )
18+ const FilesSettings = defineAsyncComponent (
19+ ( ) => import ( './views/FilesSettings.vue' ) ,
20+ )
2021 const vm = new Vue ( {
2122 render : ( h ) => h ( FilesSettings , { } ) ,
2223 } )
You can’t perform that action at this time.
0 commit comments