Skip to content

[vue-loader@next] Export default constructor does not work #340

Closed
@HerringtonDarkholme

Description

@HerringtonDarkholme

Version:

vue-loader@9.4.2

Repro:

https://github.com/HerringtonDarkholme/vue-loader-test/tree/constructor

npm install && ./node_modules/.bin/webpack && python3 -m http.server

Expected:

Exported constructor should work according to the doc.

Actual:

Vue complains Failed to mount component: template or render function not defined. (found in root instance)

Problem:
typeof __vue_modules__.default === 'object' breaks exported constructors.

Though exported constructor is not recommended, but it is the only way I can find to cooperate with class component library...

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