첫 커밋: 로컬 프로젝트 업로드
This commit is contained in:
48
baron-sso/devfront/vite.config.ts
Normal file
48
baron-sso/devfront/vite.config.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
import { defineConfig, mergeConfig } from "vite";
|
||||
import {
|
||||
commonViteConfig,
|
||||
getAllowedHosts,
|
||||
hostFromUrl,
|
||||
} from "../common/config/vite.base";
|
||||
|
||||
const buildOutDir =
|
||||
process.env.DEVFRONT_BUILD_OUT_DIR ?? "/tmp/baron-sso-devfront-dist";
|
||||
const devfrontHost = hostFromUrl(process.env.DEVFRONT_URL);
|
||||
|
||||
const allowedHosts = getAllowedHosts(
|
||||
["sdev.hmac.kr", "localhost", "172.16.10.176", "127.0.0.1"],
|
||||
devfrontHost,
|
||||
process.env.DEVFRONT_ALLOWED_HOSTS,
|
||||
);
|
||||
|
||||
export default defineConfig(
|
||||
mergeConfig(commonViteConfig, {
|
||||
cacheDir:
|
||||
process.env.DEVFRONT_VITE_CACHE_DIR ??
|
||||
"/tmp/baron-sso-devfront-vite-cache",
|
||||
build: {
|
||||
outDir: buildOutDir,
|
||||
},
|
||||
server: {
|
||||
host: "127.0.0.1",
|
||||
allowedHosts,
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: process.env.API_PROXY_TARGET || "http://localhost:3000",
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
preview: {
|
||||
host: "127.0.0.1",
|
||||
port: 5173,
|
||||
allowedHosts,
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: process.env.API_PROXY_TARGET || "http://localhost:3000",
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
);
|
||||
Reference in New Issue
Block a user