-
Notifications
You must be signed in to change notification settings - Fork 469
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]: react-router-dom cannot configure nested routers of 3 levels or more #6514
Comments
The problem occurs due to the |
any update this?? |
I think you can set The runtime module of auto public path is aligned with webpack. You can see its code here. It is calculated base on If you want to caculate base on class Plugin {
apply(compiler) {
compiler.hooks.compilation.tap("MyPlugin", compilation => {
compilation.hooks.runtimeModule.tap("MyPlugin", (module, chunk) => {
if (module.name === "auto_public_path") {
const originSource = module.source.source.toString("utf-8");
module.source.source = Buffer.from(
`/* code of your own auto public path runtime module */`,
"utf-8"
);
}
});
});
}
} |
I can't seem to apply this plugin. Is there any documentation on how to write a plugin with rspack? |
same as webpack. see this doc for more details |
System Info
MacOs M1
Details
With react router dom when I configure from nesting router 2 levels or less. Everything still works normally. To my surprise, When I configured to the 3rd level, an error appeared:
I copied all the files and worked with
vite
, everything works fine with my current config!! Is there a problem with the router?Reproduce link
https://github.com/nguyenbatranvan/rspack-turbo-mdf
Reproduce Steps
pnpm i
pnpm run remote
http://localhost:3000/nested-1
-> Workinghttp://localhost:3000/nested-1/1
-> show error aboveThe text was updated successfully, but these errors were encountered: