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

seemsindie picture seemsindie  路  3Comments

paulpflug picture paulpflug  路  3Comments

aviggngyv picture aviggngyv  路  3Comments

Jokcy picture Jokcy  路  3Comments

julianxhokaxhiu picture julianxhokaxhiu  路  3Comments