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

no anonymous default exports #226

Merged
merged 1 commit into from Aug 16, 2021
Merged

Conversation

mbostock
Copy link
Member

This is mainly to appease limitations of hot module reload systems (Webpack I think?). I don’t really like having to do this—I don’t know why Webpack et al. can’t treat the default export as an arbitrary name and just work rather than warn, but, whatever… seems easy to fix regardless.

I considered using eslint-plugin-import here, which has a rule for this. But it pulls in many trivial (dev) dependencies and doesn’t seem worth it.

@mbostock mbostock requested a review from Fil August 14, 2021 15:28
Copy link
Member

@Fil Fil left a comment

Choose a reason for hiding this comment

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

I was surprised that the minified version results in being exactly the same (except for the unrelated change in constant.js).

@mbostock mbostock merged commit e6b91a3 into main Aug 16, 2021
@mbostock mbostock deleted the mbostock/no-anonymous-default-export branch August 16, 2021 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants