-
Notifications
You must be signed in to change notification settings - Fork 27
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
Real ESM support #193
Comments
Should be resolved in the |
Actually in different projects I'm seeing different results. One works, the other complains about the fp-ts imports. 😒 |
I think 0.18.0-beta.3 is the first to work fully with both proper ESM and CJS. Depending on the consuming project different packaging issues can surface, most of which don't reveal themselves when building here. The latest surprise is that tsc requires the consuming project to be ESM to read a package's |
Nope, spoke too soon, the fp-ts imports need updating. 😡 |
Webpack:
Similar in a Node REPL:
From debugging in the REPL it looks like the imports need to be from |
^ Fixed in |
I'm interpreting this to mean that fp-ts-std effectively can't be ESM until fp-ts et al are. Perhaps the bundle bloat could be resolved with some clever bundler. |
The bundle bloat mostly goes away if the bundler is configured to rewrite |
The status quo makes the package effectively entirely broken for ESM projects as the subpath exports prevent you from manually importing from |
In a fully ESM project:
And then with that change:
Related: #113
The text was updated successfully, but these errors were encountered: