Closed renovatorruler closed 3 years ago
Sorry for taking a while to respond. I was able to reproduce it with the default configuration I had before.
My experience has been that rescript-promise works best with node when setting the suffix to .mjs
and the package.json type
to module
. (If you make this change, make sure to run npx rescript build -with-deps
to force it to recompile the promise library in mjs)
I've updated the suggested configuration in the READMe to reflect this, and added an example of this working here.
However, I'd much rather have full support for both es6 and common-js, and would be ever-so-grateful for a PR that solves it.
I believe cjs is working now.
Trying to figure out why exposing
Promise.catch
in therescript-zora
library or even callingPromise.catch
in my own code gives that es6 module error.https://github.com/ryyppy/rescript-promise/issues/15#issuecomment-891059065