redux-mock-store icon indicating copy to clipboard operation
redux-mock-store copied to clipboard

ESM problem with default export

Open huan opened this issue 4 years ago • 0 comments

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"

huan avatar Nov 13 '21 15:11 huan