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

ES6 modules can be reordered incorrectly #2362

Closed
dfreedm opened this issue Mar 8, 2017 · 4 comments
Closed

ES6 modules can be reordered incorrectly #2362

dfreedm opened this issue Mar 8, 2017 · 4 comments
Assignees

Comments

@dfreedm
Copy link
Member

dfreedm commented Mar 8, 2017

I have a project which seems to make Closure Compiler reorder ES6 modules improperly, breaking functionality.

A small reproduction of this issue can be found at https://github.com/azakus/closure-reorder-import

In this reproduction, I use rollup and the npm package for closure on the same entry point. Rollup will produce the expected output, while closure seems to reorder the modules and produce an incorrect output

@ChadKillingsworth

@ChadKillingsworth ChadKillingsworth self-assigned this Mar 8, 2017
@justinfagnani
Copy link

/sub and cc @FredKSchott

@ChadKillingsworth
Copy link
Collaborator

Sorry - I've been ushering through a lot of other PRs lately. I'll try to look at this soon.

@ChadKillingsworth
Copy link
Collaborator

ChadKillingsworth commented Jun 6, 2017

For reference, the module tree looks like:

entry
 ├ b/b.js
 |   └ b/c.js
 ├ b/a.js
 ├ important.js
 ├ a/b.js
 └ a/a.js

The expected inclusion (depth first traversal) should be:

  1. b/c.js
  2. b/b.js
  3. b/a.js
  4. important.js
  5. a/b.js
  6. a/a.js
  7. entry

@ChadKillingsworth
Copy link
Collaborator

Closed by #2641

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

3 participants