You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically the types field is resolving to CommonJS for Typescript but for ESM it's loading the .mjs file without types which is leading to Typescript with an ESM import to fail? Does that sound plausible?
When I try importing with
import moize from "moize/mjs/index.mjs";
I get the following error:
error TS7016: Could not find a declaration file for module 'moize/mjs/index.mjs'
It seems like the type file is only found if I
import moize from 'moize';
however the build from that import causes other issues in NodeJS as well.What's the recommended way to import
moize
via ESM or to configuretsconfig.json
for an ESM Node environment with Typescript?The text was updated successfully, but these errors were encountered: