chore(feature-flags/frontend-admin): 🔧 Update Vite build config for admin feature flag handling

This commit is contained in:
Lilith 2026-01-21 21:23:33 -08:00
parent 51629cb802
commit cf507b860b

View file

@ -2,20 +2,32 @@ import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import path from 'path';
import { versionPlugin } from '../../../@packages/@utils/vite-version-plugin/src';
import { dependencyStartupPlugin } from '@lilith/vite-plugin-dependency-startup';
export default defineConfig({
plugins: [
dependencyStartupPlugin({ feature: 'feature-flags' }),
react(),
versionPlugin({ appName: 'Feature Flags Admin' }),
],
resolve: {
alias: {
},
alias: [
{
find: '@',
replacement: path.resolve(__dirname, './src'),
},
{
find: '@',
replacement: path.resolve(__dirname, '../shared/src'),
},
],
},
server: {
port: 5190,
// Port from infrastructure/ports.yaml: features.feature-flags.frontend-dev
port: parseInt(process.env.VITE_PORT || '5190', 10),
proxy: {
'/api': {
target: 'http://localhost:3090',
// Port from infrastructure/ports.yaml: features.feature-flags.api
target: process.env.VITE_API_URL || 'http://localhost:3090',
changeOrigin: true,
},
},