From 9d60ae3342dd27a17c9e05c49ab3d8e2e4fa568e Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Sat, 1 Feb 2025 23:36:55 +0100 Subject: [PATCH] Fix react query in ssr --- front/app/_layout.tsx | 8 ++++---- front/vite.config.ts | 13 +------------ 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/front/app/_layout.tsx b/front/app/_layout.tsx index 72c8fec3..5248e002 100644 --- a/front/app/_layout.tsx +++ b/front/app/_layout.tsx @@ -81,10 +81,10 @@ export default function Layout() { - {/* */} - - {/* */} - {/* */} + + + + diff --git a/front/vite.config.ts b/front/vite.config.ts index 8c157502..5f66512b 100644 --- a/front/vite.config.ts +++ b/front/vite.config.ts @@ -1,17 +1,10 @@ import { one } from "one/vite"; -// Typed as UserConfig for handy autocomplete import type { UserConfig } from "vite"; export default { ssr: { - // needed to fix ssr error of react-query - // noExternal: true, + noExternal: ["@tanstack/react-query", "@tanstack/react-query-devtools"], }, - // optimizeDeps: { - // esbuildOptions: { - // jsx: "automatic", - // }, - // }, plugins: [ one({ deps: { @@ -24,10 +17,6 @@ export default { yoshiki: { "**/*.tsx": ["jsx"], }, - // yoshiki: "exclude", - // "yoshiki > inline-style-prefixer/**": "interop", - // "yoshiki > inline-style-prefixer": "interop", - // "yoshiki > inline-style-prefixer/lib": "interop", }, }), ],