-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(compiler-cli): generate proper exports.* identifiers in cjs output
When the compiler generates a reference to an exported variable in the same file, it inserts a synthetic ts.Identifier node. In CommonJS output, this synthetic node would not be properly rewritten with an `exports.` prefix. This change sets the TS original node property on the synthetic node we generate, which ensures TS knows to rewrite it in CommonJS output.
- Loading branch information
Showing
2 changed files
with
56 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters