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

Duplicate export 'default' #158

Closed
DaveWM opened this issue Jan 5, 2017 · 2 comments
Closed

Duplicate export 'default' #158

DaveWM opened this issue Jan 5, 2017 · 2 comments
Labels

Comments

@DaveWM
Copy link

DaveWM commented Jan 5, 2017

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?

@mortargrind
Copy link

I think this might be related to #110

@Rich-Harris Rich-Harris added the bug label Mar 7, 2017
Rich-Harris added a commit that referenced this issue Mar 7, 2017
handle duplicate default export case
@Rich-Harris
Copy link
Contributor

Thanks for the repro and sorry for the long delay — this is fixed in 7.0.2

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants