Reproduction link or steps
- Open https://stackblitz.com/edit/github-37iyum?file=rolldown.config.mjs
- Run
node ./dist/entry.cjs
What is expected?
When rolldown:runtime code is moved to a separate chunk (to avoid code repetition), the __toESM calls should be rewritten to require_chunk.__toESM.
What is actually happening?
The rolldown:runtime code is moved to a separate chunk, but the __toESM calls are left as-is, resulting in a ReferenceError: __toESM is not defined error.
System Info
Binaries:
Node: 18.20.4
Yarn: 1.22.21
npm: 10.7.0
pnpm: 9.7.1
Browsers:
Chrome: 131
npmPackages:
rolldown: nightly => 0.14.0-snapshot-bd95eb1-20241124003631
Any additional comments?
No response
Reproduction link or steps
node ./dist/entry.cjsWhat is expected?
When
rolldown:runtimecode is moved to a separate chunk (to avoid code repetition), the__toESMcalls should be rewritten torequire_chunk.__toESM.What is actually happening?
The
rolldown:runtimecode is moved to a separate chunk, but the__toESMcalls are left as-is, resulting in aReferenceError: __toESM is not definederror.System Info
Binaries: Node: 18.20.4 Yarn: 1.22.21 npm: 10.7.0 pnpm: 9.7.1 Browsers: Chrome: 131 npmPackages: rolldown: nightly => 0.14.0-snapshot-bd95eb1-20241124003631Any additional comments?
No response