Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
fix(nuxt): interopDefault for page component imports (#6468)
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Aug 9, 2022
1 parent bf3511c commit 3e27c1c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/nuxt/src/pages/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ export function normalizeRoutes (routes: NuxtPage[], metaImports: Set<string> =
children: route.children ? normalizeRoutes(route.children, metaImports).routes : [],
meta: route.meta ? `{...(${metaImportName} || {}), ...${JSON.stringify(route.meta)}}` : metaImportName,
alias: `${metaImportName}?.alias || []`,
component: genDynamicImport(file)
component: genDynamicImport(file, { interopDefault: true })
}
}))
}
Expand Down
3 changes: 1 addition & 2 deletions packages/schema/src/config/experimental.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,9 @@ export default {
/**
* Split server bundle into multiple chunks and dynamically import them
*
* Note: Enabling this flag can cause hydration issues in some platform.
*
* @see https://github.com/nuxt/framework/issues/6432
*/
viteServerDynamicImports: false,
viteServerDynamicImports: true,
}
}

0 comments on commit 3e27c1c

Please sign in to comment.