mirror of
https://github.com/nuxt/nuxt.git
synced 2025-03-09 03:03:18 +00:00
fix(nuxt): send the component loader and not the name
This commit is contained in:
parent
d4bca6cd57
commit
b3250e4a46
@ -74,9 +74,10 @@ export const loaderPlugin = createUnplugin((options: LoaderOptions) => {
|
||||
if (lazy) {
|
||||
// Temporary hardcoded check to verify runtime functionality
|
||||
if (name === 'DelayedWrapperTestComponent') {
|
||||
imports.add(genImport('vue', [{ name: 'defineAsyncComponent', as: '__defineAsyncComponent' }]))
|
||||
imports.add(genImport(clientDelayedComponentRuntime, [{ name: 'createLazyIOClientPage' }]))
|
||||
identifier += '_delayedIO'
|
||||
imports.add(`const ${identifier} = createLazyIOClientPage(${JSON.stringify(name)})`)
|
||||
imports.add(`const ${identifier} = createLazyIOClientPage(__defineAsyncComponent(${genDynamicImport(component.filePath)}))`)
|
||||
} else {
|
||||
imports.add(genImport('vue', [{ name: 'defineAsyncComponent', as: '__defineAsyncComponent' }]))
|
||||
identifier += '_lazy'
|
||||
|
Loading…
Reference in New Issue
Block a user