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

Fix import-related error with CommonJS modules in Node 23 #3519

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vrugtehagel
Copy link
Contributor

Fixes #3518. Modules in Node 23 (possible 22, didn't test that) have both a 'module.exports' key as well as a 'default' key, and Eleventy doesn't know about the former. As such, it incorrectly identifies the module object as the exported object, which breaks things down the road. To resolve this, accept that the top-level object has a 'module.exports' key that the object under the 'default' key does not have.

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

Successfully merging this pull request may close these issues.

Global CommonJS data files in Node 23 do not load their data
1 participant