-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Description
Vue.js version
2.0.2
Reproduction Link
https://github.com/akkinenirajesh/vuebug-withrouter
Steps to reproduce
npm install
npm run dev
What is Expected?
We should see "It worked" in browser
What is actually happening?
We will get warning in browser console.
When ''' Vue.use(VueRouter) ''' line in main.ts is commented then the code will work.
But if we uncomment that line this project does not work. We will get an error in browser console. ''' [Vue warn]: Failed to mount component: template or render function not defined. (found in component ) '''
Problem is in resolveConstructorOptions method. When vue-loader with av-ts is used, component is created in .ts file using Vue.extend({}) and render function is added to the object by vue-loader after the component is created. So render function is not part of extendOptions.
When Vue-Router is used suprtOptions are being changed and the logic in resolveConstructorOptions completely ignores the options when that happens.
I believe that options must be merged with extendOption or some thing has to be done, so that we still get the render function which is added by vue-loader.