Skip to content

Commit 1bf65ac

Browse files
authored
fix: fix static server functions (#5650)
1 parent 3eeeb88 commit 1bf65ac

File tree

6 files changed

+59
-1
lines changed

6 files changed

+59
-1
lines changed

examples/react/start-basic-static/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"@tanstack/react-router-devtools": "^1.133.32",
1414
"@tanstack/react-start": "^1.133.32",
1515
"@tanstack/start-static-server-functions": "^1.133.28",
16+
"@vitejs/plugin-react": "^5.1.0",
1617
"react": "^19.0.0",
1718
"react-dom": "^19.0.0",
1819
"redaxios": "^0.5.1",

examples/react/start-basic-static/vite.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { tanstackStart } from '@tanstack/react-start/plugin/vite'
22
import { defineConfig } from 'vite'
33
import tsConfigPaths from 'vite-tsconfig-paths'
4+
import viteReact from '@vitejs/plugin-react'
45

56
export default defineConfig({
67
server: {
@@ -24,5 +25,6 @@ export default defineConfig({
2425
failOnError: false,
2526
},
2627
}),
28+
viteReact(),
2729
],
2830
})

packages/react-start/src/plugin/vite.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export function tanstackStart(
5555
'@tanstack/react-start',
5656
'@tanstack/react-router',
5757
'@tanstack/react-router-devtools',
58+
'@tanstack/start-static-server-functions',
5859
],
5960
include: [
6061
'react',

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ export function tanstackStart(
3636
options.optimizeDeps?.noDiscovery === false)
3737
? {
3838
// As `@tanstack/solid-start` depends on `@tanstack/solid-router`, we should exclude both.
39-
exclude: ['@tanstack/solid-start', '@tanstack/solid-router'],
39+
exclude: [
40+
'@tanstack/solid-start',
41+
'@tanstack/solid-router',
42+
'@tanstack/start-static-server-functions',
43+
],
4044
}
4145
: undefined,
4246
}

packages/start-static-server-functions/package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,17 @@
6161
"dependencies": {
6262
"@tanstack/start-client-core": "workspace:*",
6363
"seroval": "^1.3.2"
64+
},
65+
"peerDependencies": {
66+
"@tanstack/react-start": "workspace:*",
67+
"@tanstack/solid-start": "workspace:*"
68+
},
69+
"peerDependenciesMeta": {
70+
"@tanstack/react-start": {
71+
"optional": true
72+
},
73+
"@tanstack/solid-start": {
74+
"optional": true
75+
}
6476
}
6577
}

pnpm-lock.yaml

Lines changed: 38 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)