Skip to content

[Bug]: panic when using preserveModules: true and certain dependencies #5387

@camc314

Description

@camc314

Reproduction link or steps

https://stackblitz.com/edit/rolldown-rolldown-starter-stackblitz-hadcbah1?file=src%2Fentry.ts

What is expected?

it doens't panic and bundles the code

What is actually happening?

it panics

pnpm run build

> rolldown-starter@ build /home/projects/rolldown-rolldown-starter-stackblitz-hadcbah1
> RD_LOG=error rolldown -c ./rolldown.config.mjs

(node:96) ExperimentalWarning: WASI is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
(node:96) ExperimentalWarning: WASI is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)

thread 'tokio-runtime-worker' panicked at crates/rolldown/src/utils/chunk/render_chunk_exports.rs:109:13:
Canonical name not found for SymbolRef { owner: 22, symbol: SymbolId(4294967292) } in chunk Some("browser") kind: EntryPoint { meta: ChunkMeta(0x0), bit: 22, module: 22 } for name CrtError
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
worker (tid = 43) sent an error! Unreachable code should not be executed (evaluating 'wasi_thread_start(tid, startArg)')
[Error [RuntimeError]: Unreachable code should not be executed (evaluating 'wasi_thread_start(tid, startArg)')]

System Info

rolldown version: 1.0.0-beta.28

Any additional comments?

No response

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions