implement ssr

This commit is contained in:
2026-09-06 23:29:00 -04:00
parent 4e381fe1bc
commit 06d31382e7
17 changed files with 477 additions and 56 deletions
+6 -2
View File
@@ -3,8 +3,12 @@ import { defineConfig } from "vite";
import tailwindcss from "@tailwindcss/vite";
// https://vite.dev/config/
export default defineConfig({
export default defineConfig(({ isSsrBuild }) => ({
plugins: [react(), tailwindcss()],
build: {
// Static files belong with the client build only.
copyPublicDir: !isSsrBuild,
},
server: {
proxy: {
"/api": {
@@ -14,4 +18,4 @@ export default defineConfig({
},
},
},
});
}));