Closed rasteiner closed 1 year ago
use
This plugin relied on the following pattern:
In a use extension:
const options = Vue.component(type).options; Vue.component(type, { extends: options, // my stuff });
In Kirby 4, however, Vue.component(type) always seems to return undefined.
Vue.component(type)
undefined
Defer the execution to the next javascript tick, at that point the components are accessible.
setTimeout(() => { const options = Vue.component(type).options; Vue.component(type, { extends: options, // my stuff }); }, 0);
probably duplicate of https://github.com/getkirby/kirby/issues/5183
Yes, would expect this to be solved with https://github.com/getkirby/kirby/pull/5202 as well
fixed in alpha 2
The
use
plugins seem to be run before the Kirby components have been registered.This plugin relied on the following pattern:
In a
use
extension:In Kirby 4, however,
Vue.component(type)
always seems to returnundefined
.Workaround
Defer the execution to the next javascript tick, at that point the components are accessible.