Skip to content

Commit

Permalink
fix: Add React Router future flags for flow auto-generated routes file (
Browse files Browse the repository at this point in the history
  • Loading branch information
mshabarov authored Dec 9, 2024
1 parent c5e53e5 commit 7fb42bb
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,21 @@ import { serverSideRoutes } from 'Frontend/generated/flow/Flow';
function build() {
const routes = [...serverSideRoutes] as RouteObject[];
return {
router: createBrowserRouter([...routes], { basename: new URL(document.baseURI).pathname }),
router: createBrowserRouter([...routes], {
basename: new URL(document.baseURI).pathname,
future: {
// eslint-disable-next-line camelcase
v7_fetcherPersist: true,
// eslint-disable-next-line camelcase
v7_normalizeFormMethod: true,
// eslint-disable-next-line camelcase
v7_partialHydration: true,
// eslint-disable-next-line camelcase
v7_relativeSplatPath: true,
// eslint-disable-next-line camelcase
v7_skipActionErrorRevalidation: true,
},
}),
routes
};
}
Expand Down

0 comments on commit 7fb42bb

Please # to comment.