Skip to content

"No default export found in module" when mixing ES5 and ES6 #558

@JasperH8g

Description

@JasperH8g

When importing a module that exports an object the old way:

// a.js
module.exports = {};

// b.js
import A from './a';

This results in:

No default export found in module

When the module you're trying to import is updated to the new syntax, it seems to be valid:

// a.js
export default {};

// b.js
import A from './a';

Unfortunately this is not possible in my case. I can disable the rule for this file as a workaround, but this should be possible right?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions