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

Add conditional exports #1

Closed
dandv opened this issue Sep 7, 2020 · 1 comment
Closed

Add conditional exports #1

dandv opened this issue Sep 7, 2020 · 1 comment

Comments

@dandv
Copy link

dandv commented Sep 7, 2020

Thanks for this template! The only issue I've run into while using it was that I couldn't use name imports from transpiled ESM code ("module": "esnext" in tsconfig.json). The error (seen by others in similar situations) was,

The requested module '...' is expected to be of type CommonJS, which does not support named exports. CommonJS modules can be imported by importing the default export.

I've solved that in my package local-iso-dt by using conditional exports (diff).

@lukeed lukeed closed this as completed in 6b6a231 Sep 7, 2020
@lukeed
Copy link
Owner

lukeed commented Sep 7, 2020

Added, thank you for the reminder :) I think I was still on-the-fence about the exports landscape, but I think enough time has passed to make me feel like it's safe to just provide it as a default.

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

2 participants