Answer the question
In order to leave comments, you need to log in
Does Node.js wrap default imports in an object?
Hello! I can not figure out one nuance.
There is a simple package.json (with type: module)
{
"name": "name",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"redux-thunk": "^2.4.1"
},
"type": "module"
}
import thunk from 'redux-thunk'
console.log(thunk)
{
default: [Function: middleware] {
withExtraArgument: [Function: createThunkMiddleware]
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question