Skip to content

vue components use CommonJS 'module.exports' #1337

@FeSeason

Description

@FeSeason

Version

13.7.0

Steps to reproduce

in vue component file, if i use the commonjs way to export

// error way
module.exports = {
    name: 'component-name'
}

// normal write
export default {

}

Because of some historical writing

What is expected?

compile is ok.

What is actually happening?

find error


21:2-16 "export 'default' (imported as '__vue_script__') was not found in '!!babel-loader!../../../node_modules/vue-loader/lib/selector?type=script&index=0!./component-upload.vue'

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