Skip to content

[Bug]: When using a web worker with lazyCompilation enabled, a compilation error occurs. #7962

@wendy0512

Description

@wendy0512

Version

System:
    OS: Windows 10 10.0.19042
    CPU: (12) x64 11th Gen Intel(R) Core(TM) i5-11500 @ 2.70GHz
    Memory: 12.17 GB / 31.71 GB
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (127.0.2651.74)  
    Internet Explorer: 11.0.19041.1566
  npmPackages:
    @rsbuild/core: ^1.0.4 => 1.0.4 
    @rsbuild/plugin-less: ^1.0.1 => 1.0.1 
    @rsbuild/plugin-react: ^1.0.2 => 1.0.2 
    @rsbuild/plugin-styled-components: ^1.0.1 => 1.0.1

Details

1.Create a worker example, as shown in the reproduction repository.
2.Enable dev: { lazyCompilation: true }, and open the page link. The following error appears in the compiler console:
image
3.If dev: { lazyCompilation: true } is disabled, the page runs normally, as shown below:
image

Reproduce link

https://github.com/wendy0512/rsbuild-worker-repro

Reproduce Steps

  1. npm i
  2. npm start

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions