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

Use named "polyfill" export and support ES module target #11

Merged
merged 7 commits into from
Apr 5, 2018
Merged

Conversation

bvaughn
Copy link
Contributor

@bvaughn bvaughn commented Apr 3, 2018

In order to support ES modules in version 2.0, this PR replaces the default export with a named "polyfill" export (and re-enabled ES module target).

Related docs update PR: reactjs/react.dev/pull/764

Resolves #8

@bvaughn bvaughn requested review from gaearon and flarnie April 3, 2018 17:12
@bvaughn bvaughn changed the title Use named "polyfill" export; re-add ES modules 2.0: Use named "polyfill" export and support ES module target Apr 3, 2018
Copy link
Contributor

@Andarist Andarist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, it's a bummer that we can't use default export for this, but I don't think it's possible to work around this.

Or rather - it's possible to keep default export, but it would mean forcing .default on CJS consumers. Either way not super friendly for CJS consumers so 🤷‍♂️

@bvaughn bvaughn requested review from sophiebits and acdlite April 3, 2018 18:46
@bvaughn bvaughn changed the title 2.0: Use named "polyfill" export and support ES module target Use named "polyfill" export and support ES module target Apr 4, 2018
@bvaughn
Copy link
Contributor Author

bvaughn commented Apr 4, 2018

Friendly ping 😄

@bvaughn bvaughn merged commit ad22a03 into master Apr 5, 2018
@bvaughn bvaughn deleted the 2.0 branch April 5, 2018 02:46
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.

3 participants