Skip to content
This repository was archived by the owner on Aug 4, 2021. It is now read-only.
This repository was archived by the owner on Aug 4, 2021. It is now read-only.

Duplicate export 'default' #158

@DaveWM

Description

@DaveWM

It seems that when a module sets both module.exports and module.exports.default, rollup throws the above error. This is needed for node to be able to import commonjs modules using es6, see this discussion of the issue.

I've put together a gist which outlines the issue here. When you run rollup -c, you get the following error:

🚨   Duplicate export 'default'
x.js (8:22)
6: export default x_1;
7: export { x_1 as __moduleExports };
8: export { default_1 as default };
                         ^
9: x_1.default = default_1;

Anyone know what's happening here?

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