rspack: [Bug]: warning `failed to get stats` with lazyCompilation in dev mode
System Info
Details
when i use rsbuild v1.0.19 with lazyCompilation mode.
the browser will show hmr connect and reload, and wait compilation done
But in v1.1.4 the browser will remain on the white page unless you refresh the page manually. it’s a bad dev experience
Reproduce link
No response
Reproduce Steps
export default defineConfig({
dev: {
progressBar: true,
lazyCompilation: true
},
})
rsbuild dev
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 29 (11 by maintainers)
This warning has been removed, please try the latest version, if you still have the same issue, I’ll reopen this
Don’t worry, it’s our issue in the first place, and improving the stabelility of lazy compilation is good for us.
I’m looking into this when I’m available, but if you have interest to help:
The lazy compilation arch is simple, there are client(your browser) and host(dev server). When bundling
Source code
How to replace the module with proxy module How proxy module works How to notify the compiler to rebuild
https://github.com/user-attachments/assets/b2e6603a-e84c-4004-8ceb-e26e15254d4b
commit: 47d9700a36dbfa4ca7fbfab48569931928f66280
BTW, I override @rspack/core to the latest commit, you can try if you can repro in the nightly version
Not at present, I’ll look into this later
Can you provide a minimal repro ? If so I can fix this in maybe several days