In the current implementation, calling new MyComponent() will return a Vue constructor instead of a vue component instance. This is forcing the use of new when assigning components to routes with vue-router (inconsistent with the vue-router documentation).
The fix is done, however this is very small breaking change for current users. Due to this, i have pushed it to the dev branch and published it to npm with the 'dev' tag. To use it point your package.json to version '^0.5.0' of vue-typescript. It will be merged with the master in the next release in a few days.
To upgrade your current projects, simply change component: new MyComponent() to component: MyComponent in your vue-router route definitions (or anywhere new was used with a component class)
In the current implementation, calling
new MyComponent()
will return a Vue constructor instead of a vue component instance. This is forcing the use ofnew
when assigning components to routes with vue-router (inconsistent with the vue-router documentation).The fix is done, however this is very small breaking change for current users. Due to this, i have pushed it to the dev branch and published it to npm with the 'dev' tag. To use it point your package.json to version '^0.5.0' of vue-typescript. It will be merged with the master in the next release in a few days.
To upgrade your current projects, simply change
component: new MyComponent()
tocomponent: MyComponent
in your vue-router route definitions (or anywhere new was used with a component class)