Which project does this relate to?
Start
Describe the bug
First
When prerender is disabled, staticFunctionMiddleware must be disabled as well, but right now it's partially disabled: Although no JSON files are created, but requests are still sent to the JSON, instead of the original server function.
Second
When spa is enabled, staticFunctionMiddleware must be enabled as well (as SPA is supposed to be static), but right now it's partially disabled, as described in the previous title.
Complete minimal reproducer
https://github.com/reza55n/tanstack-start-test
Steps to Reproduce the Bug
First
npm install
npm run build
npm run preview
In the browser, open http://localhost:4173/
Open devTools - Network
Navigate to Go about and then back to Go home
You see staticFunctionMiddleware must be disabled but it's partially disabled
(asks JSON which doesn't exist)
Second
Then:
Uncomment the line // spa: {enabled: true}, from vite.config.ts
npm run build
npm run preview
Repeat the navigation steps
You see staticFunctionMiddleware must be enabled but it's partially disabled as well
(asks JSON which doesn't exist)
Expected behavior
Explained above
Screenshots or Videos
No response
Platform
- Start Version: 1.168.32
- OS: Windows
- Browser: Chrome
- Browser Version: 150
- Bundler: Vite
- Bundler Version: 5.2.0
Additional context
No response
Which project does this relate to?
Start
Describe the bug
First
When
prerenderis disabled,staticFunctionMiddlewaremust be disabled as well, but right now it's partially disabled: Although noJSONfiles are created, but requests are still sent to theJSON, instead of the original server function.Second
When
spais enabled,staticFunctionMiddlewaremust be enabled as well (asSPAis supposed to be static), but right now it's partially disabled, as described in the previous title.Complete minimal reproducer
https://github.com/reza55n/tanstack-start-test
Steps to Reproduce the Bug
First
In the browser, open http://localhost:4173/
Open devTools - Network
Navigate to
Go aboutand then back toGo homeYou see
staticFunctionMiddlewaremust be disabled but it's partially disabled(asks JSON which doesn't exist)
Second
Then:
Uncomment the line
// spa: {enabled: true},fromvite.config.tsRepeat the navigation steps
You see
staticFunctionMiddlewaremust be enabled but it's partially disabled as well(asks JSON which doesn't exist)
Expected behavior
Explained above
Screenshots or Videos
No response
Platform
Additional context
No response