Skip to content

[Bug]: Cloudflare Pages - Outlet not working. #11480

@NeikiDev

Description

@NeikiDev

What version of React Router are you using?

^6.22.3

Steps to Reproduce

I am using an normal createReactRouter, and since today it just doesnt work after i run the build command.

Expected Behavior

Using Routes, it just shows the 404 Error not found page, anything else is just a blank page,
I changed nothing on the Routing part or whatever, i just redeployed to cloudflare pages

Actual Behavior

Just blank page.

Main.ts

ReactDOM.createRoot(document.getElementById('root')!).render(
  <React.StrictMode>
    <Routes />
  </React.StrictMode>,
)

Routes.tsx

export const ANDRoutes = [
    {
        path: '/',
        index: true,
        element: <Home />
    },
    {
        path: "/upload",
        element: <Home />
    },
    {
        path: '*',
        element: <NotFound />
    }
]

const router = createBrowserRouter([
    {
        path: '/',
        element: <App />,
        children: ANDRoutes,
        errorElement: <ErrorPage />
    }
])

export function Routes() {

    return (
        <>
            <RouterProvider router={router} />
        </>
    )
}

App.tsx

function App() {
  
  return (
    <Box>
      <Outlet/>
    </Box>
  )
}

export default App

And home.tsx and the others returns valid Elements,
If i remove the Outlet and just use static my it displays that,
if i use use nothing appears just a blank white page, no errors nothing

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions