D
D
Diman Suvorkin2022-03-17 23:38:16
JavaScript
Diman Suvorkin, 2022-03-17 23:38:16

Does webpack wrap esm imports in an object?

Hello!
After adding type: module to package.json, redux-thunk stopped working.
I connect like this: console.log(thunk) displays the following:
import thunk from "redux-thunk";

{
  default: [Function: middleware] {
    withExtraArgument: [Function: createThunkMiddleware]
  }
}

That is, the imported module is wrapped in an object with the default property. What could it be?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question