chore(frontend): scaffold Vite React TypeScript application

This commit is contained in:
2026-10-06 15:56:59 -03:00
parent 0965077cac
commit 36e2bee885
21 changed files with 4928 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
import { fileURLToPath } from "node:url";
import tailwindcss from "@tailwindcss/vite";
import react from "@vitejs/plugin-react";
import { defineConfig, loadEnv } from "vite";
import { createBackendProxy } from "./config/backend-proxy.ts";
export default defineConfig(({ mode }) => {
// Read this project's configuration; the repository .env contains server secrets.
const env = loadEnv(mode, process.cwd(), "S2S_");
return {
plugins: [react(), tailwindcss()],
resolve: { alias: { "@": fileURLToPath(new URL("./src", import.meta.url)) } },
server: {
host: "127.0.0.1",
port: 5173,
strictPort: true,
allowedHosts: (env.S2S_DEV_ALLOWED_HOSTS ?? "")
.split(",")
.map((host) => host.trim())
.filter(Boolean),
proxy: createBackendProxy(env.S2S_BACKEND_URL ?? "http://127.0.0.1:8420"),
},
build: { target: "es2022" },
};
});