SSR (server-side rendering) seems to cause more issues than benefits, so I would suggest we remove it from the application.
However, removal is not trivial. I couldn't find an example project for Vite which uses both a custom backend (for our API) that doesn't also use SSR.
Edit: We could try to use https://github.com/axe-me/vite-plugin-node. Or alternatively add a proxy to the Vite dev server when running the Express server in dev. (In production, it should simply serve files from dist/ that were built with npm run build.)
SSR (server-side rendering) seems to cause more issues than benefits, so I would suggest we remove it from the application.
However, removal is not trivial. I couldn't find an example project for Vite which uses both a custom backend (for our API) that doesn't also use SSR.
Edit: We could try to use https://github.com/axe-me/vite-plugin-node. Or alternatively add a proxy to the Vite dev server when running the Express server in dev. (In production, it should simply serve files from
dist/
that were built withnpm run build
.)