fix: remove redundant code in export * from 'external' for esm format#1974
Merged
IWANABETHATGUY merged 9 commits intomainfrom Aug 14, 2024
Merged
fix: remove redundant code in export * from 'external' for esm format#1974IWANABETHATGUY merged 9 commits intomainfrom
export * from 'external' for esm format#1974IWANABETHATGUY merged 9 commits intomainfrom
Conversation
✅ Deploy Preview for rolldown-rs canceled.
|
hyf0
reviewed
Aug 13, 2024
| let re_export_fn_name = self.canonical_name_for_runtime("__reExport"); | ||
| let importer_namespace_name = | ||
| self.canonical_name_for(self.ctx.module.namespace_object_ref); | ||
| let importee_namespace_name = self.canonical_name_for(rec.namespace_ref); |
Member
There was a problem hiding this comment.
You could get this in EcmaModule#star_exports , no need to collect them here.
Member
Author
There was a problem hiding this comment.
I tweak a little, but I still can't find a way to get rec.namespace_ref without get rec
Contributor
Benchmarks Rust |
Member
Author
|
what the heck about the benchmark? |
Member
Author
looks like just noise |
export * from 'external' for esm format
IWANABETHATGUY
commented
Aug 14, 2024
Comment on lines
+287
to
+292
| if cjs_format { | ||
| stmt_info.referenced_symbols.push(importer.namespace_object_ref.into()); | ||
| stmt_info | ||
| .referenced_symbols | ||
| .push(self.runtime.resolve_symbol("__reExport").into()); | ||
| } |
Member
Author
There was a problem hiding this comment.
for esm we on-demand reference importer.namespace_object_ref
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closed #1940