fix(es/codegen): Emit export as namespace correctly#11923
Conversation
🦋 Changeset detectedLatest commit: 0805d72 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 971fa03cf7
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| emit!(self.id); | ||
| Ok(()) |
There was a problem hiding this comment.
Terminate namespace export declarations
When Config::minify is enabled, ModuleDecl::emit does not write a newline between module declarations, so this declaration needs to emit a semicolon or another separator itself. Otherwise a .d.ts module like export as namespace Foo; export {} is printed as export as namespace Fooexport{};, merging the identifier with the next export keyword and producing invalid output; the new fixture only exercises the non-minified path.
Useful? React with 👍 / 👎.
**Related issue:** - follow up #11923
Description:
BREAKING CHANGE:
Related issue (if exists):