1
0
forked from baron/baron-sso

fix(adminfront): resolve workspace dependency and build configuration issues

- Resolve 'vite' package entry point error by consolidating workspace dependencies
- Fix PostCSS/Tailwind module resolution by utilizing pnpm hoisting
- Update vite.config.ts to stable build configuration
This commit is contained in:
2026-05-27 17:41:12 +09:00
parent 14b916fec8
commit 62d3923dee
4 changed files with 323 additions and 43 deletions

View File

@@ -0,0 +1,2 @@
allowBuilds:
esbuild: false

View File

@@ -1,44 +1,27 @@
import { defineConfig, mergeConfig } from "vite";
import { commonViteConfig, getAllowedHosts } from "../common/config/vite.base";
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import path from "path";
const buildOutDir =
process.env.ADMINFRONT_BUILD_OUT_DIR ?? "/tmp/baron-sso-adminfront-dist";
const buildOutDir = process.env.ADMINFRONT_BUILD_OUT_DIR ?? "dist";
const allowedHosts = getAllowedHosts(
["sadmin.hmac.kr", "localhost", "172.16.10.176", "127.0.0.1"],
undefined,
undefined,
);
export default defineConfig(
mergeConfig(commonViteConfig, {
envPrefix: ["VITE_", "USERFRONT_", "ORGFRONT_"],
cacheDir:
process.env.ADMINFRONT_VITE_CACHE_DIR ??
"/tmp/baron-sso-adminfront-vite-cache",
build: {
outDir: buildOutDir,
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
"lucide-react": path.resolve(process.cwd(), "node_modules/lucide-react"),
},
server: {
host: "127.0.0.1",
allowedHosts,
proxy: {
"/api": {
target: process.env.API_PROXY_TARGET || "http://localhost:3000",
changeOrigin: true,
},
},
envPrefix: ["VITE_", "USERFRONT_", "ORGFRONT_"],
build: {
outDir: buildOutDir,
},
server: {
host: "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,
proxy: {
"/api": {
target: process.env.API_PROXY_TARGET || "http://localhost:3000",
changeOrigin: true,
},
},
},
}),
);
},
});