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"> <body className="hoverEnabled">
<StyleRegistryProvider registry={registry}> <StyleRegistryProvider registry={registry}>
{/* <Providers> */} <Providers>
<Slot /> <Slot />
{/* <ReactQueryDevtools initialIsOpen={false} /> */} <ReactQueryDevtools initialIsOpen={false} />
{/* </Providers> */} </Providers>
</StyleRegistryProvider> </StyleRegistryProvider>
</body> </body>
</html> </html>

View File

@ -1,17 +1,10 @@
import { one } from "one/vite"; import { one } from "one/vite";
// Typed as UserConfig for handy autocomplete
import type { UserConfig } from "vite"; import type { UserConfig } from "vite";
export default { export default {
ssr: { ssr: {
// needed to fix ssr error of react-query noExternal: ["@tanstack/react-query", "@tanstack/react-query-devtools"],
// noExternal: true,
}, },
// optimizeDeps: {
// esbuildOptions: {
// jsx: "automatic",
// },
// },
plugins: [ plugins: [
one({ one({
deps: { deps: {
@ -24,10 +17,6 @@ export default {
yoshiki: { yoshiki: {
"**/*.tsx": ["jsx"], "**/*.tsx": ["jsx"],
}, },
// yoshiki: "exclude",
// "yoshiki > inline-style-prefixer/**": "interop",
// "yoshiki > inline-style-prefixer": "interop",
// "yoshiki > inline-style-prefixer/lib": "interop",
}, },
}), }),
], ],