redux-mock-store
redux-mock-store copied to clipboard
ESM problem with default export
With an ESM environment ("type": "module" in package.json), the default import is not what we want:
$ node
Welcome to Node.js v16.3.0.
Type ".help" for more information.
> import('redux-mock-store').then(console.info)
Promise { <pending> }
> [Module: null prototype] {
__esModule: true,
default: { default: [Function: configureStore] }
}
As we can see: the module have two default which does not match the TypeScript typing expected by @types/redux-mock-store: default: { default: [Function: configureStore] }
Version: "redux-mock-store": "^1.5.4"