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

Always import rando ...; rando.foo #3

Open
brillout opened this issue Dec 7, 2021 · 0 comments
Open

Always import rando ...; rando.foo #3

brillout opened this issue Dec 7, 2021 · 0 comments

Comments

@brillout
Copy link
Owner

brillout commented Dec 7, 2021

From Rich Harris

my one contribution would be to try and convince everyone that trying to get named exports out of CJS is the wrong move, unless __esModule is present. if you're importing from a CJS module, just always use the default. it's the only way to avoid all the annoying interop quirks

yeah, the value of being able to do import { foo } from 'rando-cjs-package' is vastly outweighed by the predictability and reliability of always having to do import rando ...; rando.foo in my experience

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

No branches or pull requests

1 participant