You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The root cause of this problem is that when using multiCompiler(Multiple rsbuild environments), webpack-dev-middleware matches resources based on the outputPath + publicPath of each compiler. When the environment node is created before the web, webpack-dev-middleware preferentially matches the resources in node stats.
Version
Details
When multiple environments exist and their products are
dist/main.js
(web product) anddist/bundle/main.js
(node product)expect:
dist/main.js
when accessinglocalhost:3000/mian
dist/bundle/main.js
when accessinglocalhost:3000/bundle/mian
actual:
dist/bundle/main.js
when accessinglocalhost:3000/mian
(unexpected)dist/bundle/main.js
when accessinglocalhost:3000/bundle/mian
The rsbuild configuration is as follows:
Reproduce link
none
Reproduce Steps
The root cause of this problem is that when using
multiCompiler
(Multiple rsbuild environments),webpack-dev-middleware
matches resources based on the outputPath + publicPath of each compiler. When the environmentnode
is created before theweb
,webpack-dev-middleware
preferentially matches the resources innode
stats.https://github.com/webpack/webpack-dev-middleware/blob/master/src/utils/getFilenameFromUrl.js#L68
This can be temporarily solved by adjusting the environment registration order.
The text was updated successfully, but these errors were encountered: