TanStackT
TanStack9mo ago
14 replies
worthy-azure

Running a reverse proxy for the dev server, I need to configure HMR options which are not available

Hi, all. I know this will surely be fixed once vinxi is removed from the project and we can configure vite directly, but was wondering if there might be a workaround someone is aware of. My issue is I need to point my reverse proxy to specific ports of the dev server including the HMR port and client port. I had this working perfectly when using Remix+vite, but hit this roadblock when migrating to tanstack/start.

This is what I want to achieve:
export default defineConfig({
  vite: {
    ...
    server: {
      ...
      hmr: {
        clientPort: 443,
        port: Number(process.env.HMR_PORT!),
      },
    },
  },
});


I had opened a discussion for it: https://github.com/TanStack/router/discussions/4023
GitHub
I'm running my tanstack start app behind a local reverse proxy for development and need to provide the following options which I had been using successfully using Remix: import { defineConfig }...
How can I specify vite server options when using @tanstack/react-st...
Was this page helpful?