Skip to content

Type Definitions broken in 2.3.0? #1202

@eugirdor

Description

@eugirdor

Vue.js / vue-router versions

2.1.2 / 2.3.0

Reproduction Link

Steps to reproduce

Using Typescript 2.2.1 and Webpack 2.2.1

In VueRouter 2.2.1 importing was done with import VueRouter = require('vue-router') but it looks like in 2.3.0 it needs to be import VueRouter from 'vue-router'.

The issue is that it looks like the type definitions still define the export as export = VueRouter where it needs to be export default VueRouter now.

What is Expected?

Importing 'vue-router' the proper way should not give a compiler warning.

What is actually happening?

When Using: import VueRouter = require('vue-router')
You Get: Uncaught TypeError: VueRouter is not a constructor

When Using: import VueRouter from 'vue-router
You Get: Compiler warning that vue-router has no default export

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