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

Merged
merged 2 commits into from
Dec 11, 2024

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.

@vrugtehagel vrugtehagel requested a review from zachleat as a code owner October 29, 2024 16:38
@zachleat zachleat merged commit e38a287 into 11ty:main Dec 11, 2024
11 checks passed
@zachleat
Copy link
Member

Shipping with v3.0.1-alpha.1

@zachleat zachleat added this to the Eleventy 3.0.1 milestone Dec 11, 2024
@vrugtehagel vrugtehagel deleted the patch-1 branch December 11, 2024 21:12
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
2 participants