[Bug]: react-router-dom cannot configure nested routers of 3 levels or more
nguyenbatranvan opened this issue · comments
Van Nguyen commented
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
- goto
http://localhost:3000/nested-1
-> Working - goto
http://localhost:3000/nested-1/1
-> show error above
Van Nguyen commented
The problem occurs due to the publicPath='auto'
configuration. If I specify publicPath='http://localhost:3000'
the problem is resolved. Is there any way to automatically get publicPath according to window.location.origin
?