mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 23:22:02 +00:00
[autofix.ci] apply automated fixes
This commit is contained in:
parent
20a32b2200
commit
816ba111b4
@ -73,12 +73,11 @@ export const loaderPlugin = createUnplugin((options: LoaderOptions) => {
|
|||||||
|
|
||||||
if (lazy) {
|
if (lazy) {
|
||||||
// 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)})`)
|
imports.add(`const ${identifier} = createLazyIOClientPage(${JSON.stringify(name)})`)
|
||||||
identifier += '_delayedIO'
|
identifier += '_delayedIO'
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
imports.add(genImport('vue', [{ name: 'defineAsyncComponent', as: '__defineAsyncComponent' }]))
|
imports.add(genImport('vue', [{ name: 'defineAsyncComponent', as: '__defineAsyncComponent' }]))
|
||||||
identifier += '_lazy'
|
identifier += '_lazy'
|
||||||
imports.add(`const ${identifier} = __defineAsyncComponent(${genDynamicImport(component.filePath, { interopDefault: false })}.then(c => c.${component.export ?? 'default'} || c)${isClientOnly ? '.then(c => createClientOnly(c))' : ''})`)
|
imports.add(`const ${identifier} = __defineAsyncComponent(${genDynamicImport(component.filePath, { interopDefault: false })}.then(c => c.${component.export ?? 'default'} || c)${isClientOnly ? '.then(c => createClientOnly(c))' : ''})`)
|
||||||
|
Loading…
Reference in New Issue
Block a user