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

"type": "module" is preventing this package from being import from non-module environments #210

Closed
RebeccaStevens opened this issue May 29, 2022 · 3 comments · Fixed by #271

Comments

@RebeccaStevens
Copy link
Contributor

RebeccaStevens commented May 29, 2022

I've opened an issue for this with TypeScript as I believe this to be unintended behavior, but if it ends up being the case that it's not then "type": "module" will need to be removed from package.json.

@Swatinem
Copy link
Owner

This is interesting, so is this specific to typescript resolving the package? Or are there actually issues with how it is consumed by Node itself?

@RebeccaStevens
Copy link
Contributor Author

I haven't tested with node itself but I wouldn't imagine there to be any issue there as the package is explicitly using .cjs and .mjs extensions.

@Swatinem
Copy link
Owner

I can’t remember specifically, but it may be possible that the type: "module" was needed to have the internal tests etc working. But I think its also possible to make that work with explicit file extensions rather.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants