bitip/src/frontend/vite.config.ts
Tudor Stanciu 345ed9c68c Merged PR 109: Bitip project initialization - GeoIP lookup service with frontend interface
- feat: Implement GeoIP lookup service with frontend interface
- feat: Add dotenv dependency and configure environment variables; update rate limiter response handling
- refactor: Remove development Dockerfile and docker-compose for streamlined setup; update GeoIP service to use new MaxMind types
- chore: update dependencies and ESLint configuration
- feat: Add documentation for breaking changes and package updates after major version upgrades
- feat: Add environment configuration files and update module imports for ES module support
- feat: Update nodemon configuration and add register script for ES module support
- feat: Add .gitattributes file to enforce LF line endings and define text/binary file types
- feat: Implement graceful shutdown with timeout and update nodemon configuration
- feat: Update environment configuration and add detailed configuration guide
- feat: add frontend origin validation and update rate limits
- feat: add versioning arguments and detailed OCI image labels to Dockerfile
- feat: add version and release notes endpoints, update frontend to display release notes
- feat: Refactor App component to use React Router for navigation
- feat: Update navigation styles and remove unused type definitions for react-router-dom
- feat: Generate runtime configuration for frontend and serve env.js
- feat: Update dependencies, enhance ESLint configuration, and improve Vite setup
- refactor: Remove ensureTrailingSlash function and simplify basePath assignment in Vite config
2025-10-02 22:59:22 +00:00

27 lines
623 B
TypeScript

import { defineConfig, loadEnv } from 'vite';
import react from '@vitejs/plugin-react';
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
// Load env file based on `mode` in the current working directory.
const env = loadEnv(mode, process.cwd(), '');
const basePath = env.VITE_BASE_PATH || '/';
return {
base: basePath,
plugins: [react()],
publicDir: 'public',
build: {
outDir: '../../../dist/frontend',
},
server: {
proxy: {
'/api': {
target: 'http://localhost:5172',
changeOrigin: true,
},
},
},
};
});