fix: switch back from esm to cjs / provide cjs fallback #44
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We want to use this package together w/
tscand sometimes withts-node[-dev]as well.We've been debugging various issues when trying to implement this, and
the only thing that helped was using cjs instead of esm.
Currently we have [1] a fork of this repo as a git submodule, with the
submitted PRs implemented in a separate branch, and use that directly
instead of an npm package - it works great, but this is far from ideal
and going back to cjs / using it in general means better compatibility
for all of your consumers - both those using cjs and esm.
This does not apply the other way around, and that's why it's an
issue for us that this package is with esm.
[1] https://github.com/kiprasmel/using-fs-xattr-with-ts
If this deems unacceptible, could you keep the things as-is,
but also create a separate file that uses cjs
which we could import from the npm package
something similar to this:
or similar?
see also:
https://twitter.com/Rich_Harris/status/1441068317930819589