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

Incorrect errors on duplicate export { x as y } #463

Closed
Rich-Harris opened this issue Sep 8, 2016 · 1 comment
Closed

Incorrect errors on duplicate export { x as y } #463

Rich-Harris opened this issue Sep 8, 2016 · 1 comment

Comments

@Rich-Harris
Copy link
Contributor

The new duplicate export checking is great and will allow us to remove some code from Rollup. However, it looks like it's throwing errors wrongly in cases like these:

acorn.parse(`
  export { x as y } from './y.js';
  export { x as z } from './z.js';
`, { sourceType: 'module' });
// SyntaxError: Duplicate export 'x' (3:11)

acorn.parse(`
  export { default as y } from './y.js';
  export default 42;
`, { sourceType: 'module' });
// SyntaxError: Duplicate export 'default' (1:51)

(Also, the location in that second error message looks suspicious?) I can try and make a PR if I get time this weekend. Thanks!

@marijnh marijnh closed this as completed in 5ab4935 Sep 8, 2016
@marijnh
Copy link
Member

marijnh commented Sep 8, 2016

I've fixed this and released 4.0.1 with the fix.

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

No branches or pull requests

2 participants