Skip to content

Importing defaults doesn't work under ESM #1636

Answered by cspotcode
magyargergo asked this question in Q&A
Discussion options

You must be logged in to vote

You might be hitting this issue, copied from the nodejs documentation that you linked:

When importing CommonJS modules, the module.exports object is provided as the default export. Named exports may be available, provided by static analysis as a convenience for better ecosystem compatibility.

You are doing a wildcard import, but a default import. So that's the first thing I would test.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by magyargergo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants