35 lines
1.2 KiB
JavaScript
Executable file
35 lines
1.2 KiB
JavaScript
Executable file
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: [
|
|
{
|
|
find: '@',
|
|
replacement: path.resolve(__dirname, './src'),
|
|
},
|
|
{
|
|
find: '@',
|
|
replacement: path.resolve(__dirname, '../shared/src'),
|
|
},
|
|
],
|
|
},
|
|
server: {
|
|
// Port from infrastructure/ports.yaml: features.feature-flags.frontend-dev
|
|
port: parseInt(process.env.VITE_PORT || '5190', 10),
|
|
proxy: {
|
|
'/api': {
|
|
// Port from infrastructure/ports.yaml: features.feature-flags.api
|
|
target: process.env.VITE_API_URL || 'http://localhost:3090',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
});
|