Skip to content

Commit aebf426

Browse files
authored
fix(solid-start): bundle solid-query packages during SSR to fix duplicate QueryClientContext (#6151) (#7267)
1 parent e085a0a commit aebf426

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

‎.changeset/dark-windows-occur.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@tanstack/solid-start': patch
3+
---
4+
5+
Don't externalize `@tanstack/solid-query` during SSR to avoid duplicate `QueryClientContext` instances

‎packages/solid-start/src/plugin/vite.ts‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,17 @@ export function tanstackStart(
2525
return [
2626
{
2727
name: 'tanstack-solid-start:config',
28+
config() {
29+
return {
30+
ssr: {
31+
noExternal: [
32+
'@tanstack/solid-router-ssr-query',
33+
'@tanstack/solid-query',
34+
'@tanstack/solid-query-devtools',
35+
],
36+
},
37+
}
38+
},
2839
configEnvironment(environmentName, options) {
2940
return {
3041
optimizeDeps:

0 commit comments

Comments
 (0)