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

Remove all default exports (major) #185

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

marvinhagemeister
Copy link
Member

@marvinhagemeister marvinhagemeister commented Mar 10, 2021

Mixing both default and named exports has no clearly defined behaviour and can easily lead to unexpected results. Some tools use a combination of default + __esModule property and others ignore named exports completely if both are found. Those issues are difficult to debug when multiple tools are used together.

This change makes some code redundant by not having to patch a hand crafted exports object for commonjs environments.

Mixing both default and named exports has no clearly defined behaviour
and can easily lead to unexpected results. Some tools use a combination of
"default" + "__esModule" property and others ignore named exports
completely if both are found. Those issues are difficult to debug when multiple tools are
used together.

This change makes some code redundant by not having to patch a hand crafted exports
object for commonjs environments.
@developit
Copy link
Member

Couldn't we provide only a default export? None of the other exported methods were widely used.

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