I'm lazy-loading a component globally like this:
Vue.component(
'TheDialog',
() => import(/* webpackChunkName: "theDialog" */ '@/components/TheDialog')
)
Works fine, but when I run tests on another component, which contain TheDialog as a child component, I get this warning:
[Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.
Also, I have the same error when importing a global component without lazy-loading:
import TheDialog from '@/components/TheDialog'
Vue.component(
'TheDialog', TheDialog
)
Does somebody know the problem?