Initial commit
This commit is contained in:
commit
11d8229eb5
8 changed files with 1914 additions and 0 deletions
32
vite.config.js
Normal file
32
vite.config.js
Normal file
|
@ -0,0 +1,32 @@
|
|||
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,
|
||||
},
|
||||
hmr: {
|
||||
protocol: process.env.MCL,
|
||||
},
|
||||
},
|
||||
build: {
|
||||
outDir: "./build",
|
||||
},
|
||||
base: "/mcl/",
|
||||
resolve: {
|
||||
alias: {
|
||||
"@mcl": path.resolve("./src"),
|
||||
},
|
||||
},
|
||||
});
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue