Skip to content

[Bug]: panicked at crates/rspack_plugin_lazy_compilation/src/module.rs:250:10 #11691

@SoonIter

Description

@SoonIter

System Info

@rspack/core 1.5.4 1.5.5

Details

// index.js
import('./hello').then((module) => {
  const hello = module.default;
  console.log(hello)
})
// hello.js

remove the src/hello.js and panicked at crates/rspack_plugin_lazy_compilation/src/module.rs:250:10

  Rsbuild v1.5.7

  ➜  Local:    http://localhost:3001/
  ➜  Network:  http://100.84.247.90:3001/
  ➜  press h + enter to show shortcuts

info    port 3000 is in use, using port 3001.
start   build started...
ready   built in 0.04 s
start   build started...
ready   built in 0.04 s
start   building removed src/hello.js
Panic occurred at runtime. Please file an issue on GitHub with the backtrace below: https://github.com/web-infra-dev/rspack/issues: panicked at crates/rspack_plugin_lazy_compilation/src/module.rs:250:10:

expected behavior

module build failed but not panic

Reproduce link

https://github.com/SoonIter/rsbuild-lazy-compilation-panic-issue

Reproduce Steps

  1. pnpm install
  2. pnpm dev
  3. remove src/hello.js and panicked at crates/rspack_plugin_lazy_compilation/src/module.rs:250:10

Metadata

Metadata

Assignees

Labels

teamThe issue/pr is created by the member of Rspack.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions