Which project does this relate to?
Start
Describe the bug
When running the preview server in SPA mode with HTTPS enabled, the server fails to serve the application shell. Instead, it crashes with an error below:
TypeError: res.setHeaders is not a function
at file:///X:/experiments/tanstack-preview-server-https-bug/node_modules/@tanstack/start-plugin-core/dist/esm/preview-server-plugin/plugin.js:31:19
Development server with HTTPS certificates works fine.
Your Example Website or App
https://github.com/susickypavel/tanstack-preview-server-https-bug
Steps to Reproduce the Bug or Issue
- Clone the repository
git clone git@github.com:susickypavel/tanstack-preview-server-https-bug.git
cd ./tanstack-preview-server-https-bug
- Create certificates for
example.localhost
mkdir .certs
cd .certs
mkcert example.localhost "*.example.localhost"
- Add
example.localhost to hosts file
# For Mac or Linux
nano /etc/hosts
127.0.0.1 example.localhost
- Install dependencies and run the preview server
bun install
bun run build:preview
Expected behavior
I'd expect the preview server to work the same way it works for bun dev, but it should use the production files instead.
Screenshots or Videos
No response
Platform
- Router / Start Version: 1.132.0
- OS: Windows
- Browser: All
- Bundler: vite
Additional context
No response
Which project does this relate to?
Start
Describe the bug
When running the preview server in SPA mode with HTTPS enabled, the server fails to serve the application shell. Instead, it crashes with an error below:
Development server with HTTPS certificates works fine.
Your Example Website or App
https://github.com/susickypavel/tanstack-preview-server-https-bug
Steps to Reproduce the Bug or Issue
git clone git@github.com:susickypavel/tanstack-preview-server-https-bug.git cd ./tanstack-preview-server-https-bugexample.localhostexample.localhostto hosts file# For Mac or Linux nano /etc/hosts 127.0.0.1 example.localhostExpected behavior
I'd expect the preview server to work the same way it works for
bun dev, but it should use the production files instead.Screenshots or Videos
No response
Platform
Additional context
No response