Closed kaiyoma closed 1 year ago
Switching to Vite/Vitest (away from webpack/Jest) fixed this issue for me.
I'm seeing the same with typechecking with "moduleResolution": "Node16"
. You can workaround it like so:
import _memoizeOne from 'memoize-one';
const memoizeOne = _memoizeOne as unknown as typeof _memoizeOne.default;
I've been using memoize-one from CJS for many years, but when I try to convert the calling code to ESM, I now get this error:
I'm pretty sure my import is correct:
I'm not getting this error with any other dependency, so it seems specific to memoize-one. My package still builds correctly, which means it's maybe just an error with the types. I'm using the latest version (6.0.0).