react-vite-typesafe/packages/web/react-router.config.ts

24 lines
800 B
TypeScript
Raw Normal View History

2025-04-02 15:57:57 +02:00
import type { Config } from "@react-router/dev/config";
import { type Future, Route } from "react-router";
declare module "react-router" {
interface Future {
unstable_middleware: true; // 👈 Enable middleware types
}
//AppLoadContext is replaced with the ContextAPI enabled by the unstable_middlewares flag
// interface AppLoadContext {
// remove_me_i_am_a_test: string;
// }
}
2025-04-02 15:57:57 +02:00
export default {
// Config options...
// Server-side render by default, to enable SPA mode set this to `false`
ssr: true,
future: {
//TODO Keep up to date with the unstable releases over at https://reactrouter.com/changelog
//See: https://github.com/remix-run/react-router/blob/release-next/decisions/0014-context-middleware.md
unstable_middleware: true,
},
2025-04-02 15:57:57 +02:00
} satisfies Config;