Conversation
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Contributor
Benchmarks Rust
|
hyf0
approved these changes
May 9, 2025
Member
hyf0
left a comment
There was a problem hiding this comment.
What about case module.exports = {}?
7100bbd to
251aa8c
Compare
Contributor
Author
Not sure your meaning. |
dce4417 to
5d53810
Compare
✅ Deploy Preview for rolldown-rs canceled.
|
Member
|
What about case |
6c65ff0 to
136a6df
Compare
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jun 27, 2025
`__rolldown_runtime__.__toCommonJS(namespace);` was generated in the HMR
code. But this call is no-op (the return value is not used).
```js
var __toCommonJS = mod => __copyProps(__defProp({}, '__esModule', { value: true }), mod)
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === 'object' || typeof from === 'function')
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
key = keys[i]
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: (k => from[k]).bind(null, key), enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable })
}
return to
}
var __defProp = Object.defineProperty
```
Also this call is slow because it copies all properties.
This seems to be added by #4461
but I'm not sure why this was added.
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
The previous implementation has a problem for cjs.
The runtime using
Object.keys(esmExportGettersOrCjsExports)can't get it's real exports.The pr fixed it directly using
exportsat runtime. To compat it with esm, using esm namespace object is suitable.