Skip to content
Discussion options

You must be logged in to vote

I've reached out to the devs on Discords and @RobertBoes helped me resolve this problem.

He explained resolvePageComponent (or importPageComponent) returns a promise so we should await this method to obtain the default export.

From there we can set the default layout.

resolve: async (name) => {
  const page = (await resolvePageComponent(`./Pages/${name}.vue`, import.meta.glob('./Pages/**/*.vue'))).default
  page.layout = page.layout || DefaultLayout
  return page
},

This solved my issue. The default layout is showing up and is persistent.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@whitespacecode
Comment options

@lakshmajee
Comment options

Answer selected by sneakylenny
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants