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

feat(expose-loader): support alternate options to handle exporting ESM (Harmony) modules #85

Closed
wants to merge 2 commits into from
Closed

Conversation

patrick-mcdougle
Copy link

@patrick-mcdougle patrick-mcdougle commented Feb 22, 2019

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

Fixes #56
Fixes #82
Fixes #87

Breaking Changes

Old options behavior should still work, though, I don't have good test cases to prove that. Additional testing welcomed.

Additional Info

This will be my first PR to anything node / webpack so please be nice. 😆

@jsf-clabot
Copy link

jsf-clabot commented Feb 22, 2019

CLA assistant check
All committers have signed the CLA.

@patrick-mcdougle
Copy link
Author

patrick-mcdougle commented Feb 22, 2019

I realize I didn't follow the commit message guidelines. I'll fix soon. 😳

Done.

@qinmingyuan
Copy link

qinmingyuan commented Aug 23, 2019

Want this PR;
but There is a bug, can not work well;

README.md Outdated Show resolved Hide resolved
Patrick McDougle and others added 2 commits November 17, 2019 10:17
Before this change the expose loader could only handle exposing the one thing exported from module.exports. This is great for modules that are written using RJS, but Harmony modules are an issue, since in the RJS representation of a Harmony module you might have named exports or the default export that you want to expose (without wanting to have to use .default every time). This adds an object syntax to the loader options which allows you to expose a single key of the RJS representation of the Harmony module instead of the whole thing.

Fixes #56
A bug in lint-staged dependencies made using node 10 not possible when committing to this repository.
@patrick-mcdougle
Copy link
Author

Ok this has been updated. There's one other chore added to this PR which is to upgrade one of the dependencies to allow node 10+ in lint-staged. Please let me know if this should be separated from this PR.

@patrick-mcdougle patrick-mcdougle changed the title Support alternate options to handle exporting ESM (Harmony) modules feat(expose-loader): support alternate options to handle exporting ESM (Harmony) modules Nov 17, 2019
@yellow1912
Copy link

Is there any news? This is going to be very useful.

@cap-Bernardito cap-Bernardito mentioned this pull request Jun 15, 2020
6 tasks
@patrick-mcdougle patrick-mcdougle deleted the pmcd-default-export-expose branch May 9, 2021 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants