Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESM problem with default export #182

Open
huan opened this issue Nov 13, 2021 · 0 comments
Open

ESM problem with default export #182

huan opened this issue Nov 13, 2021 · 0 comments

Comments

@huan
Copy link

huan commented Nov 13, 2021

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant