Skip to content

feat: Only emit __esModule properties in CJS modules when there is a default export#15018

Merged
lforst merged 3 commits intodevelopfrom
lforst-default-ts-export-fix
Jan 15, 2025
Merged

feat: Only emit __esModule properties in CJS modules when there is a default export#15018
lforst merged 3 commits intodevelopfrom
lforst-default-ts-export-fix

Conversation

@lforst
Copy link
Copy Markdown
Contributor

@lforst lforst commented Jan 14, 2025

Ref: #3105

By having the __esModule property in files where we don't have default exports we may trick tooling into thinking that there would be a default export. The probability of that happening nowadays is pretty low, but since __esModule is a non-standard property we should limit it to the minimum.

@lforst lforst force-pushed the lforst-default-ts-export-fix branch from 33073e5 to ebc1621 Compare January 14, 2025 23:02
@lforst lforst merged commit 5e5bd44 into develop Jan 15, 2025
@lforst lforst deleted the lforst-default-ts-export-fix branch January 15, 2025 08:43
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.

2 participants