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 exports for public api #354

Merged
merged 3 commits into from
Aug 7, 2019
Merged

Use named exports for public api #354

merged 3 commits into from
Aug 7, 2019

Conversation

TrySound
Copy link
Collaborator

Default exports are always a headache for public api. They are hard to
use when same module is used for both node and webpack via commonjs.
We have this problem

webpack/webpack#6584

Mixing named and default exports works even buggier.

webpack/webpack#7973

The best solution is using only named exports. They fits perfectly with
interops and may work without interop for commonjs.

(module.exports = was a mistake, export default IMO too)

Default exports are always a headache for public api. They are hard to
use when same module is used for both node and webpack via commonjs.
We have this problem

webpack/webpack#6584

Mixing named and default exports works even buggier.

webpack/webpack#7973

The best solution is using only named exports. They fits perfectly with
interops and may work without interop for commonjs.

(module.exports = was a mistake, export default IMO too)
@coveralls
Copy link

coveralls commented Jul 28, 2019

Coverage Status

Coverage increased (+0.009%) to 98.545% when pulling edef179 on named-exports into ed97d77 on master.

@TrySound
Copy link
Collaborator Author

/cc @jonschlinkert @doowb @shockey

Copy link
Collaborator

@doowb doowb left a comment

Choose a reason for hiding this comment

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

Thanks for this! I wondered how exports default was used now so I think this makes sense.

LGTM

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