32 lines
905 B
TypeScript
Executable file
32 lines
905 B
TypeScript
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: 'webmap' }),
|
|
react(),
|
|
versionPlugin({ appName: 'Webmap Public' }),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
},
|
|
},
|
|
server: {
|
|
// Port from infrastructure/ports.yaml: features.webmap.frontend-dev
|
|
port: parseInt(process.env.VITE_PORT || '5101', 10),
|
|
strictPort: true,
|
|
proxy: {
|
|
'/api': {
|
|
target: process.env.VITE_API_URL || 'http://localhost:4002',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
preview: {
|
|
port: parseInt(process.env.VITE_PORT || '5101', 10),
|
|
},
|
|
});
|