2025-04-02 15:57:57 +02:00
|
|
|
import type { Config } from "@react-router/dev/config";
|
2025-04-03 13:34:45 +02:00
|
|
|
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,
|
2025-04-03 13:34:45 +02:00
|
|
|
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;
|