Skip to content

Commit

Permalink
fix(nuxt): log errors rendering islands (#24356)
Browse files Browse the repository at this point in the history
  • Loading branch information
huang-julien committed Nov 18, 2023
1 parent c2b8adb commit 7cce0ef
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/nuxt/src/app/components/island-renderer.ts
@@ -1,5 +1,5 @@
import type { defineAsyncComponent } from 'vue'
import { createVNode, defineComponent } from 'vue'
import { createVNode, defineComponent, onErrorCaptured } from 'vue'

import { createError } from '../composables/error'

Expand All @@ -23,6 +23,10 @@ export default defineComponent({
})
}

onErrorCaptured((e) => {
console.log(e)
})

return () => createVNode(component || 'span', { ...props.context.props, 'nuxt-ssr-component-uid': '' })
}
})

0 comments on commit 7cce0ef

Please sign in to comment.