Fix react query in ssr

This commit is contained in:
Zoe Roux 2025-02-01 23:36:55 +01:00
parent 23a7e7b025
commit 9d60ae3342
No known key found for this signature in database
2 changed files with 5 additions and 16 deletions

View File

@ -81,10 +81,10 @@ export default function Layout() {
<body className="hoverEnabled">
<StyleRegistryProvider registry={registry}>
{/* <Providers> */}
<Slot />
{/* <ReactQueryDevtools initialIsOpen={false} /> */}
{/* </Providers> */}
<Providers>
<Slot />
<ReactQueryDevtools initialIsOpen={false} />
</Providers>
</StyleRegistryProvider>
</body>
</html>

View File

@ -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",
},
}),
],