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

Make sure rollup output matching input #2477

Merged
merged 2 commits into from
May 22, 2019
Merged

Make sure rollup output matching input #2477

merged 2 commits into from
May 22, 2019

Conversation

jbanety
Copy link
Contributor

@jbanety jbanety commented May 20, 2019

An other issue with Rollup output (as #2468).
If my external deps share common code, Rollup will create a chunk with this shared code. That's OK.
But Rollup will add this chunk at the output so import map will be wrong again :

{
  "imports": {
    "@etdsolutions/request": "./chunk-e62c8060.js",
    "single-spa": "./request-627619e8.js",
    "@etdsolutions/stacks": "./single-spa-2080b5a8.js",
    "@etdsolutions/uid": "./stacks-ff183556.js",
    "@fortawesome/free-solid-svg-icons/faChevronUp.js": "./uid-203f014d.js",
    "@fortawesome/free-solid-svg-icons/faChevronDown.js": "./faChevronUp-0ffe90b6.js",
    "bootstrap.native": "./faChevronDown-577c640c.js",
    "@fortawesome/fontawesome-svg-core": "./bootstrap-c17f3a72.js",
    "@etdsolutions/routie": "./fontawesome-svg-core-00332bf4.js",
    "one": "./routie-ad357c93.js",
    "@erp/ui-components/helpers/notify.js": "./one-54bc149a.js",
    "lodash-es/assign.js": "./notify-556a357a.js",
    "lodash-es/clone.js": "./assign-d637c92e.js"
  }
}

Here lodash functions share multiple files.
I fixed that with filtering output array.

src/build/index.ts Outdated Show resolved Hide resolved
@guybedford
Copy link
Member

This looks really great, thanks again. Just see the one comment on filter simplification.

I've created a Rollup tracking issue for supporting this natively in rollup/rollup#2868.

Co-Authored-By: Guy Bedford <[email protected]>
@guybedford guybedford merged commit 6292a9d into jspm:master May 22, 2019
@guybedford
Copy link
Member

Published in 2.0.0-beta.5.

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

Successfully merging this pull request may close these issues.

2 participants