forked from baron/baron-sso
35 lines
876 B
TypeScript
35 lines
876 B
TypeScript
import react from "@vitejs/plugin-react";
|
|
import { defineConfig } from "vite";
|
|
|
|
const buildOutDir =
|
|
process.env.ADMINFRONT_BUILD_OUT_DIR ?? "/tmp/baron-sso-adminfront-dist";
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
envPrefix: ["VITE_", "USERFRONT_", "ORGFRONT_"],
|
|
build: {
|
|
outDir: buildOutDir,
|
|
},
|
|
server: {
|
|
host: "127.0.0.1",
|
|
allowedHosts: ["sadmin.hmac.kr", "localhost", "172.16.10.176", "127.0.0.1"],
|
|
proxy: {
|
|
"/api": {
|
|
target: process.env.API_PROXY_TARGET || "http://localhost:3000",
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
preview: {
|
|
host: "127.0.0.1",
|
|
port: 5173,
|
|
allowedHosts: ["sadmin.hmac.kr", "localhost", "172.16.10.176", "127.0.0.1"],
|
|
proxy: {
|
|
"/api": {
|
|
target: process.env.API_PROXY_TARGET || "http://localhost:3000",
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
});
|