mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-15 11:18:54 +02:00
Image en trois étapes (frontend Vite, binaire Rust, Debian slim avec FFmpeg), healthcheck /healthz, dépendances npm propres à l'ancien serveur retirées, CI Rust (fmt, clippy, tests) et documentation de la mise à jour au prochain démarrage de la stack. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013qMexTfVRaegbPAgsagCAJ
47 lines
1.3 KiB
TypeScript
47 lines
1.3 KiB
TypeScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import path from "path";
|
|
import runtimeErrorOverlay from "@replit/vite-plugin-runtime-error-modal";
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
react(),
|
|
runtimeErrorOverlay(),
|
|
...(process.env.NODE_ENV !== "production" &&
|
|
process.env.REPL_ID !== undefined
|
|
? [
|
|
await import("@replit/vite-plugin-cartographer").then((m) =>
|
|
m.cartographer(),
|
|
),
|
|
await import("@replit/vite-plugin-dev-banner").then((m) =>
|
|
m.devBanner(),
|
|
),
|
|
]
|
|
: []),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(import.meta.dirname, "client", "src"),
|
|
"@shared": path.resolve(import.meta.dirname, "shared"),
|
|
"@assets": path.resolve(import.meta.dirname, "attached_assets"),
|
|
},
|
|
},
|
|
root: path.resolve(import.meta.dirname, "client"),
|
|
build: {
|
|
outDir: path.resolve(import.meta.dirname, "dist/public"),
|
|
emptyOutDir: true,
|
|
},
|
|
server: {
|
|
// En développement, l'API et les fichiers sont servis par le serveur Rust
|
|
// (`npm run dev:server`, port 5000 par défaut).
|
|
proxy: {
|
|
"/api": process.env.API_URL ?? "http://localhost:5000",
|
|
"/uploads": process.env.API_URL ?? "http://localhost:5000",
|
|
},
|
|
fs: {
|
|
strict: true,
|
|
deny: ["**/.*"],
|
|
},
|
|
},
|
|
});
|