Files
gatehouse-ui/vite.config.ts
T
JamesBhattarai e6b9081d7f Chore(Fix): Added CLI Guide + Refractor API Key Page UI
Refractor SSH Key Page
Fix Vite config env load
2026-03-22 15:38:52 +05:45

26 lines
652 B
TypeScript

import { defineConfig, loadEnv } from "vite";
import react from "@vitejs/plugin-react-swc";
import path from "path";
import { componentTagger } from "lovable-tagger";
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), "");
return {
server: {
host: "::",
port: 8080,
allowedHosts: env.VITE_ALLOWED_HOSTS?.split(",") || [
"ui.webauthn.local",
"gatehouse-ui.hawkvelt.tech",
],
},
plugins: [react(), mode === "development" && componentTagger()].filter(Boolean),
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
};
});