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]: <Outlet/> not working in build production with Vite. #11517
Comments
Could you provide a minimal reproduction of the issue? |
Routing.tsx, all this code is inside // Import dynamic pages here const routes: RouteProps[] = [ const Routing: FC = () => { export default Routing; After reaching the home page, I only see the layout without the homepage content, but inside the layout, the PrivateRoute contains the Outlet, so don't worry. After downgrading the version of react-router-dom, all my routes work as expected, as I mentioned in the previous message. While debugging, I noticed that the Outlet isn't functioning in latest version. I'm using Vite and React with TypeScript. The router only fails to work when I build for production and preview it. |
solved in #11480 (comment) |
Yeah my guess is this is due to the bad rollup version - please ensure vite is using the latest version of rollup and the issue should be resolved (see the comments in #11480 for how to do this). Closing this as a duplicate. |
What version of React Router are you using?
^6.23
Steps to Reproduce
I changed version to previous one ^6.21.3 and all works like needed. So inside my component is But I don't see my home page. After decreasing version of react router all works like needed.
Expected Behavior
Should render nested Routes.
Actual Behavior
Outlet not working, so I don't see nested Routes
The text was updated successfully, but these errors were encountered: