Skip to content

Conversation

@sandersn
Copy link
Member

The commonjs-specific code for resolving access expressions on require assumes a fake commonjs export. For real exports, it needs to call resolveSymbol since it's outside the normal alias-resolving infrastructure.

Fixes #40185

The commonjs-specific code for resolving access expressions on `require`
assumes a fake commonjs export. For real exports, it needs to call
resolveSymbol since it's outside the normal alias-resolving
infrastructure.
@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Aug 24, 2020
@sandersn sandersn merged commit 4aadd5a into master Aug 24, 2020
@sandersn sandersn deleted the fix-commonjs-require-of-es-export branch August 24, 2020 19:37
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Milestone Bug PRs that fix a bug with a specific milestone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

In JS, commonjs require followed by access expression can't import from ES

4 participants