[TS] Initial Typescript fix

This commit is contained in:
Dunemask 2024-04-06 20:38:10 -06:00
parent 8c15dd6752
commit 813295c857
36 changed files with 4285 additions and 1951 deletions

29
vite.config.ts Normal file
View file

@ -0,0 +1,29 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import tsconfigPaths from "vite-tsconfig-paths";
const { MCL_VITE_BACKEND_URL, MCL_VITE_DEV_PORT } = process.env;
const backendUrl = MCL_VITE_BACKEND_URL ?? "http://localhost:52000";
const vitePort = MCL_VITE_DEV_PORT ?? 52025;
export default () => {
return defineConfig({
plugins: [react(), tsconfigPaths()],
server: {
host: "0.0.0.0",
port: Number(vitePort),
proxy: {
"/api": backendUrl,
"/socket.io": backendUrl,
"/healthz": backendUrl,
},
hmr: {
protocol: process.env.MCL_VITE_DEV_PROTOCOL,
},
},
build: {
outDir: "./build/vite",
},
base: "/mcl/",
});
};