Vue: Vue.extend causes nested mixins to be merged twice

Created on 29 Sep 2018  ·  3Comments  ·  Source: vuejs/vue

Version

2.5.17

Reproduction link

https://codepen.io/anon/pen/ReNVra?editors=0011

Steps to reproduce

Open the console

What is expected?

"mixinA created"
"mixinB created"
"ChildComponent created"

What is actually happening?

"mixinA created"
"mixinA created"
"mixinB created"
"ChildComponent created"

MixinB.options still has mixins, which gets applied again if used in mixins: [] or extends: even though Vue.extend() has already done that

All 3 comments

Don't use Vue.extend on a mixin, a mixins are plain objects

Not if you use typescript they aren't.

Can you provide an example of how to handle this when using typescript @posva ?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

julianxhokaxhiu picture julianxhokaxhiu  ·  3Comments

gkiely picture gkiely  ·  3Comments

hiendv picture hiendv  ·  3Comments

lmnsg picture lmnsg  ·  3Comments

bfis picture bfis  ·  3Comments