Add vite.config.ts

This commit is contained in:
2026-02-04 06:46:38 +01:00
parent 399e4efdad
commit 904e6b253a

27
vite.config.ts Normal file
View File

@@ -0,0 +1,27 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
export default defineConfig(() => {
const host = process.env.TAURI_DEV_HOST;
return {
plugins: [react()],
clearScreen: false,
server: {
port: 5173,
strictPort: true,
host: host || false,
hmr: host
? {
protocol: "ws",
host,
port: 5173,
}
: undefined,
},
build: {
target: "esnext",
minify: !process.env.TAURI_DEBUG ? "esbuild" : false,
sourcemap: !!process.env.TAURI_DEBUG,
},
};
});