-
Notifications
You must be signed in to change notification settings - Fork 139
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]: MF breaks the asset path when more than one sub path #2482
Comments
Note that when you use |
Note that |
|
Is public path set to auto? |
Was fixed in dev by setting Updated the codesandbox to demo when it fails with |
I tried to change publicPath to / but it is not working for the host app. |
Did you setup MF via tools: {
rspack: (config, { appendPlugins }) => {
config.output.publicPath = "/";
appendPlugins([
new ModuleFederationPlugin({ // ...my options })
]);
},
}, |
I'm using the v1 moduleFederation.options . |
No certain but I think you can find the plugin of the 1.5 from |
maybe related to #2747 ? |
To resolve this issue, upgrade to the latest version of Module Federation. |
@imzisy this issue also happen with the built-in module federation of rsbuild, not only using the external plugin |
After upgrading to |
this doesn't seem like an issue anymore. should be safe to close it? |
Fixed on the latest versions |
Version
Details
When setting
moduleFederation.options
and reloading with more than one sub path (.i.e/sub/path
) Rsbuild inject assets without the prefix/
even settingoutput.assetPrefix: "/"
resulting in a white page.Commenting or removing the whole
moduleFederation
from rsbuild config and everything works well.See the attached Codesandbox and repository to reproduce.
Reproduce link
https://codesandbox.io/p/github/XavierLeTohic/rsbuild-mf-asset-path/main
Reproduce Steps
The repo of the codesandbox is here:
https://github.com/XavierLeTohic/rsbuild-mf-asset-path
To reproduce:
npm install
oryarn install
npm run dev
oryarn dev
http://localhost:5050/example
everything will work as expected if you reloadhttp://localhost:5050/example/sub/path
and reload it will be brokenrsbuild.config.ts
and try to reload it'll workThe text was updated successfully, but these errors were encountered: