minesweeper-frontend/vite.config.js
Jose134 3c0ea2c14f
All checks were successful
gitea/minesweeper-frontend/pipeline/head This commit looks good
Fix deployment
2025-01-22 12:19:34 +01:00

24 lines
501 B
JavaScript

import { defineConfig, loadEnv } from "vite";
import process from "process";
import react from "@vitejs/plugin-react";
export default defineConfig(({ command, mode }) => {
const env = loadEnv(mode, process.cwd());
return {
plugins: [react()],
server: {
port: 5173,
host: true,
watch: {
usePolling: true,
},
esbuild: {
target: "esnext",
platform: "linux",
},
},
define: {
VITE_SOCKET_URL: JSON.stringify(env.VITE_SOCKET_URL),
},
};
});