-
Notifications
You must be signed in to change notification settings - Fork 130
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]: Module Federation breaks publicPath / assetsPrefix #3751
Comments
It seems that this is a problem that occurs due to the defaults that rsbuild applies when configuring module federation. According to docs, when using module federation it does set output.PublicPath to 'auto'. However, even with an explicit |
As mentioned in the documentation, Rsbuild set the default value of Rspack's output.publicPath configuration to 'auto' when using I have tried the reproduction, and considering that there is no |
@chenjiahan Let's assume we're using a single page application that has a client side routing and the server always returns the same
|
I've tried to keep it simple, but if I add an SPA router and a path |
Thanks for the info. I have discussed this with @2heal1 from the Module Federation team and I will be submitting some patches to fix this issue soon. |
Thanks a lot for the quick reactions @chenjiahan @2heal1 |
Version
System:
OS: Windows 11 10.0.22631
CPU: (32) x64 AMD Ryzen 9 3950X 16-Core Processor
Memory: 28.51 GB / 63.92 GB
Browsers:
Edge: Chromium (128.0.2739.42)
Internet Explorer: 11.0.22621.3527
npmPackages:
@rsbuild/core: 1.0.15 => 1.0.15
@rsbuild/plugin-react: 1.0.5 => 1.0.5
Details
Adding an empty module federation configuration to a basic RSBuild app breaks the publicPath / assetsPrefix by removing the leading slash.
With moduleFederation:
Without moduleFederation:
Reproduce link
https://github.com/danantal/rsbuild-demo
Reproduce Steps
Expected: page loads correctly
Actual: blank page due to assets referenced incorrectly
If you comment out the
moduleFederation
configuration inrsbuild.config.ts
then it works as expected.The text was updated successfully, but these errors were encountered: