-
-
Notifications
You must be signed in to change notification settings - Fork 501
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 |
@nguyenbatranvan did you managed to get this working? I'm facing the same issue |
I have solved this problem, do you want to refer? |
I'm closing this issue as it behaves as same as webpack. Further discussion is welcome, please do not hesitate. |
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:
![image](https://private-user-images.githubusercontent.com/19392455/329797948-8a0f9efb-0ba6-411b-a03f-2ad73dd0819e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyNzUwNDgsIm5iZiI6MTcyNDI3NDc0OCwicGF0aCI6Ii8xOTM5MjQ1NS8zMjk3OTc5NDgtOGEwZjllZmItMGJhNi00MTFiLWEwM2YtMmFkNzNkZDA4MTllLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIxVDIxMTIyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg2NWY5OWEyNGEzMjcxMzBmNGMxM2NlMDJjYWE0ZmY3Y2YyN2YwN2I1ZDkwMTZhZDBjNDkxOTE5N2Y4MjEyMDcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.20V6qefrmBhjWk_DHS2PX3FniwyU2U--1Sos8gw-Iio)
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: