forked from baron/baron-sso
- 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
28 lines
626 B
TypeScript
28 lines
626 B
TypeScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import path from "path";
|
|
|
|
const buildOutDir = process.env.ADMINFRONT_BUILD_OUT_DIR ?? "dist";
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
"lucide-react": path.resolve(process.cwd(), "node_modules/lucide-react"),
|
|
},
|
|
},
|
|
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,
|
|
},
|
|
},
|
|
},
|
|
});
|