Closed wata727 closed 5 years ago
@wata727 Do you mean changing main
to a UMD or would it be enough with creating a new target like dist/classcat.umd.js
?
I think that the least impact from the current release is to add a new target. We plan to use moduleNameMapper to replace it during testing. See https://jestjs.io/docs/en/configuration.html#modulenamemapper-object-string-string
{
"moduleNameMapper": {
"classcat": "classcat/dist/classcat.umd.js"
}
}
@wata727 That's a good idea. Would you like to send me a PR? Otherwise, I can get to it later today.
Sure! I'll try it.
@wata727 Fixed with 378cabe, but do check, please. 🎉
@jorgebucaran It worked well. Thank you!
Congratulations on the v4 release :tada:
Btw, our Jest tests are broken with the classcat v4 :cry:
I guess that's probably because the main target is now an ES module. But Jest doesn't support ES modules natively. See https://github.com/facebook/jest/issues/4842
My team thinks it is not a good idea to introduce Babel just because of this problem... Could you also support CommonJS style modules? Thank you.