Skip to content

Conversation

@HerringtonDarkholme
Copy link
Member

@HerringtonDarkholme HerringtonDarkholme commented Oct 29, 2016

Fix #432 and vuejs/vue#4052

When users have Vue.mixin(globalMixin), vue-loader will fail for constructor style export because Ctor.options is replaced and redner function lost.

In vue's core code. resolveCtorOptions will compute the options for a consturctor by merging extendOptions and SuperOptions. Vue.mixin will reset SuperOptions and constructor's option is replaced. So render function which vue-loader set is lost. However, if extendOptions has render, newly created options will preserve render function.

@yyx990803
Copy link
Member

Thanks, I think it's better to fix it in core so that vue-loader's bundle output will be smaller.

See vuejs/vue@09f9783

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

render function is lost when used in Constructor style

2 participants