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

issue with build map #2468

Closed
jbanety opened this issue May 15, 2019 · 3 comments · Fixed by #2470
Closed

issue with build map #2468

jbanety opened this issue May 15, 2019 · 3 comments · Fixed by #2470

Comments

@jbanety
Copy link
Contributor

jbanety commented May 15, 2019

Sometimes when I run the command jspm build $(jspm trace --deps ./app.js) -h -o, the output map is wrong.

Example of output :

{
  "imports": {
    "@etdsolutions/stacks": "./dist/stacks-ff183556.js",
    "@erp/ui-components/parcels/list.parcel.js": "./dist/request-db1f16d4.js",
    "@etdsolutions/request": "./dist/routie-ad357c93.js",
    "@etdsolutions/uid": "./dist/list.parcel-8b402777.js",
    "@erp/ui-components/parcels/sidenav.parcel.js": "./dist/uid-0b9cbb9d.js",
    "@etdsolutions/routie": "./dist/sidenav.parcel-466e49de.js"
  }
}

As we can see, the rollup generated code is not corresponding to the good bare specifier.
After investigating, it seems that jspm's inputObj and rollup's output are not is the same order but I can't understand wky.

Any idea ?

@guybedford
Copy link
Member

Very interesting. This sounds like a Rolllup bug then as the sort is supposed to be stable.

Rollup does its output sort here - https://github.com/rollup/rollup/blob/master/src/rollup/index.ts#L359.

I guess the problem then is the outputBundle object not being populated in entry point order first.

Definitely an important bug to fix.

Alternatively I wonder if we could do some sort of matching in jspm to correct for this.

@jbanety
Copy link
Contributor Author

jbanety commented May 16, 2019

I create a PR #2470 to fix this issue.

@guybedford
Copy link
Member

Released in 2.0.0-beta.4.

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

Successfully merging a pull request may close this issue.

2 participants