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(node): correct resolution of dynamic import of esm from cjs #27071

Merged
merged 14 commits into from
Nov 26, 2024

Conversation

dsherret
Copy link
Member

@dsherret dsherret commented Nov 26, 2024

Ensures a dynamic import in a CJS file will consider the referrer as an import for node resolution.

Includes:

Also adds fixes (adds) support for "resolution-mode" in TypeScript: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-3.html#stable-support-resolution-mode-in-import-types

Closes #27059

@dsherret dsherret marked this pull request as ready for review November 26, 2024 03:35
@dsherret dsherret requested a review from bartlomieju November 26, 2024 03:51
@dsherret dsherret merged commit 115a306 into denoland:main Nov 26, 2024
17 checks passed
@dsherret dsherret deleted the fix_node_resolution_dynamic_import branch November 26, 2024 19:38
bartlomieju pushed a commit that referenced this pull request Nov 28, 2024
Ensures a dynamic import in a CJS file will consider the referrer as an import for node resolution.

Also adds fixes (adds) support for `"resolution-mode"` in TypeScript.
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.

require-branch of conditional exports is used when dynamically importing and requesting module is commonjs
2 participants