File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import { wrapFunctional } from './utils'
8
8
] . filter ( Boolean ) . join ( ', ' )
9
9
if ( c . isAsync ) {
10
10
const exp = c . export === 'default' ? `c.default || c` : `c['${ c . export } ']`
11
- const asyncImport = `import('../${ relativeToBuild ( c . filePath ) } ' /* ${ magicComments } */).then(c => wrapFunctional(${ exp } ))`
11
+ const asyncImport = `() => import('../${ relativeToBuild ( c . filePath ) } ' /* ${ magicComments } */).then(c => wrapFunctional(${ exp } ))`
12
12
return `export const ${ c . pascalName } = ${ asyncImport } `
13
13
} else {
14
14
const exp = c . export === 'default' ? `default as ${ c . pascalName } ` : c . pascalName
Original file line number Diff line number Diff line change @@ -3,5 +3,5 @@ import * as components from './index'
3
3
4
4
for ( const name in components ) {
5
5
Vue . component ( name , components [ name ] )
6
- Vue . component ( 'Lazy' + name , ( ) => Promise . resolve ( components [ name ] ) )
6
+ Vue . component ( 'Lazy' + name , components [ name ] )
7
7
}
You can’t perform that action at this time.
0 commit comments