From 4b062bec3964461e8fb2f3e84f7076814b918f4e Mon Sep 17 00:00:00 2001 From: Camilla Marie Dalan Date: Sun, 15 Dec 2024 21:24:37 +0100 Subject: [PATCH] adds v3 future flags --- app/root.tsx | 3 +-- vite.config.ts | 11 ++++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/root.tsx b/app/root.tsx index 9e9a617..53c934d 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -1,5 +1,4 @@ import type { LinksFunction, MetaFunction } from "@remix-run/node"; -import { json } from "@remix-run/node"; import { Links, Meta, @@ -22,7 +21,7 @@ export const meta: MetaFunction = () => [ export const loader: LoaderFunction = async ({ request }) => { const user = await authenticator.isAuthenticated(request); - return json({ user }); + return { user }; }; export default function App() { diff --git a/vite.config.ts b/vite.config.ts index eb624ea..764c001 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -8,7 +8,16 @@ installGlobals(); export default defineConfig({ plugins: [ - remix({ ignoredRouteFiles: ["**/.*"] }), + remix({ + ignoredRouteFiles: ["**/.*"], + future: { + v3_fetcherPersist: true, + v3_relativeSplatPath: true, + v3_throwAbortReason: true, + v3_singleFetch: true, + v3_lazyRouteDiscovery: true, + }, + }), netlifyPlugin(), tsconfigPaths(), ],