-
-
Notifications
You must be signed in to change notification settings - Fork 626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: When using a web worker with lazyCompilation enabled, a compilation error occurs. #7962
Comments
As of version 1.014, I'm still encountering errors during runtime. Could you please help me look into this bug? @JSerFeng |
Sorry for the delay, I checked the repro, turns out it was a HMR bug for both Rspack and webpack, I'm fixing it but it was tricky, I'm working on it |
For the temporary solution is to disable splitChunks, you can achieve that by config like this defineConfig({
tools: { rspack(config) {config.optimization.splitChunks = false} }
}) |
You can try this version @rspack/[email protected], should be fine |
Version
Details
1.Create a worker example, as shown in the reproduction repository.
![image](https://private-user-images.githubusercontent.com/44644033/370093471-a557788d-b560-4935-bf6f-28066f5ad48a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2NjkzNjUsIm5iZiI6MTczOTY2OTA2NSwicGF0aCI6Ii80NDY0NDAzMy8zNzAwOTM0NzEtYTU1Nzc4OGQtYjU2MC00OTM1LWJmNmYtMjgwNjZmNWFkNDhhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE2VDAxMjQyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdiMzE1YTM2NjRiYThhZDY0MDBhZWM1OWM2Yzg2OTkxMDAyMTBmYTVlMDVlMWNjZDI3NjFkOTYzYzM3Y2JlNWQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.wVVcd72rPCKadwmQPf2DzfS0RGhKv8dawaYRhCEsFxI)
![image](https://private-user-images.githubusercontent.com/44644033/370093657-58632e8c-5d39-4fd0-bd17-4d55864dca3c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2NjkzNjUsIm5iZiI6MTczOTY2OTA2NSwicGF0aCI6Ii80NDY0NDAzMy8zNzAwOTM2NTctNTg2MzJlOGMtNWQzOS00ZmQwLWJkMTctNGQ1NTg2NGRjYTNjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE2VDAxMjQyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTVhMTIyNTgyNTE3ODczZGI3NTQ5ZmJmODkxMWE1NjQ5YzhkMGYyZDMyMWUxNDY0MThkYmE5ZDc5MTYxZTgzNzEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.6vvzL-E4R44W8LGzgF81hfpvOaIEIkOKFT-cd-fWAgU)
2.Enable dev: { lazyCompilation: true }, and open the page link. The following error appears in the compiler console:
3.If dev: { lazyCompilation: true } is disabled, the page runs normally, as shown below:
Reproduce link
https://github.com/wendy0512/rsbuild-worker-repro
Reproduce Steps
The text was updated successfully, but these errors were encountered: