Skip to content

render funciton missing when using av-ts with Vue-Router #4052

@akkinenirajesh

Description

@akkinenirajesh

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions