Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renamed default exports generates invalid ES6 module code #339

Closed
Victorystick opened this issue Dec 3, 2015 · 0 comments
Closed

Renamed default exports generates invalid ES6 module code #339

Victorystick opened this issue Dec 3, 2015 · 0 comments

Comments

@Victorystick
Copy link
Contributor

Rollup sometimes generates invalid code when targeting es6 modules.

This module

// main.js
import foo from './bar.js';
export default foo;

importing that

// bar.js
var bar = 1;
export default bar;

generates

// output.es6.js
var bar = 1;
export default foo;

None of the other formats have this bug. However, this other example which does basically the same thing breaks all formats except es6 with TypeError: Cannot read property 'render' of undefined.

// main.js
export { default as default } from './bar.js';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant