Closed abhinkrishna closed 2 years ago
I'm also having this same problem when running my Jest tests. I believe it is the fact that the published bundled of this library is an ES module (having imports/exports) instead of a commonjs version (understood by nodejs).
I think that you would need to setup webpack to transform this library through babel or something. I'm trying to do that right now with my jest "transform" config, without much luck :(
@javierfernandes Thanks for the heads up. I just changed module
in the tsconfig.json
from esnext
to commonjs
and recompiled.
Now with latest version v0.3.15
you shouldn't need anymore to configure Jest as currently described in the docs: could you please confirm this on your end too...?
I am getting this error when tried to use with Next.js.
Is this package compatibility issue or did I miss something?
Thank you
nextjs