mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix: append identifier before import
This commit is contained in:
parent
2236f78566
commit
36dc73152f
@ -75,8 +75,8 @@ export const loaderPlugin = createUnplugin((options: LoaderOptions) => {
|
|||||||
// Temporary hardcoded check to verify runtime functionality
|
// Temporary hardcoded check to verify runtime functionality
|
||||||
if (name === 'DelayedWrapperTestComponent') {
|
if (name === 'DelayedWrapperTestComponent') {
|
||||||
imports.add(genImport(clientDelayedComponentRuntime, [{ name: 'createLazyIOClientPage' }]))
|
imports.add(genImport(clientDelayedComponentRuntime, [{ name: 'createLazyIOClientPage' }]))
|
||||||
imports.add(`const ${identifier} = createLazyIOClientPage(${JSON.stringify(name)})`)
|
|
||||||
identifier += '_delayedIO'
|
identifier += '_delayedIO'
|
||||||
|
imports.add(`const ${identifier} = createLazyIOClientPage(${JSON.stringify(name)})`)
|
||||||
} else {
|
} else {
|
||||||
imports.add(genImport('vue', [{ name: 'defineAsyncComponent', as: '__defineAsyncComponent' }]))
|
imports.add(genImport('vue', [{ name: 'defineAsyncComponent', as: '__defineAsyncComponent' }]))
|
||||||
identifier += '_lazy'
|
identifier += '_lazy'
|
||||||
|
Loading…
Reference in New Issue
Block a user