[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

View file

@ -1,39 +0,0 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import path from "node:path";
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()],
server: {
host: "0.0.0.0",
port: vitePort,
proxy: {
"/api": backendUrl,
"/socket.io": backendUrl,
"/healthz": backendUrl,
},
hmr: {
protocol: process.env.MCL_VITE_DEV_PROTOCOL,
},
},
build: {
outDir: "./build",
},
base: "/mcl/",
resolve: {
alias: {
"@mcl/css": path.resolve("./src/css"),
"@mcl/settings": path.resolve("./src/ctx/SettingsContext.jsx"),
"@mcl/pages": path.resolve("./src/pages"),
"@mcl/queries": path.resolve("./src/util/queries.js"),
"@mcl/components": path.resolve("./src/components"),
"@mcl": path.resolve("./src"),
},
},
});
};