diff --git a/packages/nuxt/src/components/loader.ts b/packages/nuxt/src/components/loader.ts index b768ee462a..92052bb544 100644 --- a/packages/nuxt/src/components/loader.ts +++ b/packages/nuxt/src/components/loader.ts @@ -95,17 +95,7 @@ export const loaderPlugin = createUnplugin((options: LoaderOptions) => { imports.add(genImport('vue', [{ name: 'defineAsyncComponent', as: '__defineAsyncComponent' }])) identifier += '_lazy' imports.add(`const ${identifier} = __defineAsyncComponent(${genDynamicImport(component.filePath, { interopDefault: false })}.then(c => c.${component.export ?? 'default'} || c)${isClientOnly ? '.then(c => createClientOnly(c))' : ''})`) - } - } - // 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(__defineAsyncComponent(${genDynamicImport(component.filePath, { interopDefault: false })}.then(c => c.${component.export ?? 'default'} || c)))`) - } else { - - } + } } else { imports.add(genImport(component.filePath, [{ name: component._raw ? 'default' : component.export, as: identifier }]))