Skip to content

Vue3 defineAsyncComponent hide error message in console on fail #9608

Discussion options

You must be logged in to vote

Try using this method:

const ForkedComponent = await defineAsyncComponent({
  loader: () => {
    return import(`@/components/${themeName}/${compName()}.vue`).catch(
      () => import(`@/components/generic/${compName()}.vue`)
    )
  },
  suspensible: true,
  errorComponent: ErrorComponent,
  timeout: 1000
})

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nexorianus
Comment options

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