Skip to content

Missing default export when using SystemJS or RequireJS makes Vue unusable with TypeScript #6815

Closed
@ciddan

Description

@ciddan

Version

2.5.2

Reproduction link

https://github.com/ciddan/vue-2.5-issues

Steps to reproduce

  1. Clone the repo.
  2. npm install.
  3. run "gulp".
  4. Navigate to the appropriate address in your browser (default http://localhost:3000).
  5. Note console output.

The project is configured to use SystemJS by default. You can switch to RequireJS by modifying index.html and src/login/Login.ts and uncommenting the RequireJS code (and commenting out the SystemJS code).

What is expected?

No errors in console and vue_1.default being defined.

What is actually happening?

SystemJS (Firefox Developer Edition):
Error: class heritage vue_1.default is not an object or null
Evaluating http://localhost:8080/dist/src/login/Login.js
Loading app.bootstrap.js

RequireJS (Firefox Developer Edition):
TypeError: class heritage vue_1.default is not an object or null


This bug appeared after upgrading a major project from Vue 2.4 to Vue 2.5.
We do not use Webpack in our project, nor do we want to switch to it.

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