setup() is not run for mixins and extends
Version
3.0.5
Reproduction link
https://jsfiddle.net/mL4s8k2b/3/
Steps to reproduce
I'm trying to upgrade my app to Vue 3 but it looks like the combination of mixins/extends and setup functions are not working as I expected. In the example below I would expect all setup
functions to be called, but they are not.
Vue.createApp({
data: () => ({ }),
extends: {
setup() {
console.log("Extends setup");
}
},
mixins: [{
setup() {
console.log("Mixins setup");
}
}],
}).mount('#app')
What is expected?
I would expect the setup
function to be called for extends and mixins of a component, and the result from that setup
function to be available to the component itself
What is actually happening?
The setup
function is never called - as seen in the example, there is no output in the log indicating that they are called.