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: CJS require('.') resolution #108

Merged
merged 4 commits into from
Jul 1, 2024

Conversation

timfish
Copy link
Contributor

@timfish timfish commented Jun 18, 2024

Closes #116 and closes #97

While trying to create a minimal reproduction for #106, I found that the issue was caused by the following CommonJs in @prisma/client:

module.exports = { ...require('.') }

require('.') was getting resolved to {cwd}/index.js whereas it should be resolving to ./, ie. the index file in the same directory as the current file ./index.js.

Copy link
Contributor

@jsumners-nr jsumners-nr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@timfish timfish merged commit 29c77b5 into nodejs:main Jul 1, 2024
48 checks passed
@timfish timfish deleted the fix/cjs-root-resolution branch July 1, 2024 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants