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

Global CommonJS data files in Node 23 do not load their data #3518

Open
vrugtehagel opened this issue Oct 29, 2024 · 0 comments · May be fixed by #3519
Open

Global CommonJS data files in Node 23 do not load their data #3518

vrugtehagel opened this issue Oct 29, 2024 · 0 comments · May be fixed by #3519

Comments

@vrugtehagel
Copy link
Contributor

vrugtehagel commented Oct 29, 2024

Eleventy

3.0.0

Describe the bug

When using CommonJS syntax in Node 23, global data files are not loaded properly and results in the data being unavailable throughout the build.

This is because Module objects for modules using module.exports now contain two keys, 'default' and 'module.exports', and Eleventy specifically checks if there is only one before accessing the default property. Then it goes on to make sure the keys from 'default' and those in the top level are the same, which fails on the 'module.exports' key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant