[INIT] Initial Project Structure
This commit is contained in:
commit
0fc5f05b6a
105 changed files with 10448 additions and 0 deletions
31
vite.config.ts
Normal file
31
vite.config.ts
Normal file
|
@ -0,0 +1,31 @@
|
|||
import config from "./lib/config";
|
||||
import { defineConfig } from "vite";
|
||||
import tsconfigPaths from "vite-tsconfig-paths";
|
||||
import react from "@vitejs/plugin-react";
|
||||
|
||||
const { CAIRO_VITE_BACKEND_URL, CAIRO_VITE_DEV_PORT } = process.env;
|
||||
const backendUrl = CAIRO_VITE_BACKEND_URL ?? "http://localhost:52000";
|
||||
const vitePort = Number(CAIRO_VITE_DEV_PORT) ?? 52025;
|
||||
export default () => {
|
||||
return defineConfig({
|
||||
plugins: [react(), tsconfigPaths()],
|
||||
server: {
|
||||
host: "0.0.0.0",
|
||||
port: vitePort,
|
||||
proxy: {
|
||||
"/api": backendUrl,
|
||||
"/healthz": backendUrl,
|
||||
},
|
||||
hmr: {
|
||||
protocol: process.env.CAIRO_VITE_DEV_PROTOCOL,
|
||||
},
|
||||
},
|
||||
build: {
|
||||
outDir: "./build/vite",
|
||||
},
|
||||
base: config.Server.basePath,
|
||||
define: {
|
||||
"import.meta.env.VITE_CAIRO_PROJECT": JSON.stringify(config.Server.projectSlug),
|
||||
},
|
||||
});
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue