refactor(frontend): rename project to s2s-frontend
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
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: 8420,
|
||||
strictPort: true,
|
||||
ws: { path: "/__vite_hmr" },
|
||||
allowedHosts: (env.S2S_DEV_ALLOWED_HOSTS ?? "")
|
||||
.split(",")
|
||||
.map((host) => host.trim())
|
||||
.filter(Boolean),
|
||||
proxy: createBackendProxy(env.S2S_BACKEND_URL ?? "http://127.0.0.1:8421"),
|
||||
},
|
||||
build: { target: "es2022" },
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user