mirror of
https://github.com/SamyRai/turash.git
synced 2025-12-26 23:01:33 +00:00
- Remove nested git repository from bugulma/frontend/.git - Add all frontend files to main repository tracking - Convert from separate frontend/backend repos to unified monorepo - Preserve all frontend code and development history as tracked files - Eliminate nested repository complexity for simpler development workflow This creates a proper monorepo structure with frontend and backend coexisting in the same repository for easier development and deployment.
51 lines
1.5 KiB
TypeScript
51 lines
1.5 KiB
TypeScript
import react from '@vitejs/plugin-react';
|
|
import path from 'path';
|
|
import { defineConfig, loadEnv } from 'vite';
|
|
|
|
export default defineConfig(({ mode }) => {
|
|
const env = loadEnv(mode, '.', '');
|
|
const isProduction = mode === 'production';
|
|
|
|
return {
|
|
server: {
|
|
port: 3000,
|
|
host: '0.0.0.0',
|
|
// Force HTTPS in production builds
|
|
https: isProduction ? true : false,
|
|
proxy: {
|
|
'/auth': {
|
|
target: isProduction
|
|
? env.VITE_API_BASE_URL || 'https://api.bugulma.city'
|
|
: 'http://localhost:8080',
|
|
changeOrigin: true,
|
|
secure: isProduction, // Verify SSL certificates in production
|
|
},
|
|
'/api': {
|
|
target: isProduction
|
|
? env.VITE_API_BASE_URL || 'https://api.bugulma.city'
|
|
: 'http://localhost:8080',
|
|
changeOrigin: true,
|
|
secure: isProduction, // Verify SSL certificates in production
|
|
},
|
|
'/static': {
|
|
target: isProduction
|
|
? env.VITE_API_BASE_URL || 'https://api.bugulma.city'
|
|
: 'http://localhost:8080',
|
|
changeOrigin: true,
|
|
secure: isProduction, // Verify SSL certificates in production
|
|
},
|
|
},
|
|
},
|
|
plugins: [react()],
|
|
define: {
|
|
'process.env.API_KEY': JSON.stringify(env.GEMINI_API_KEY),
|
|
'process.env.GEMINI_API_KEY': JSON.stringify(env.GEMINI_API_KEY),
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, '.'),
|
|
},
|
|
},
|
|
};
|
|
});
|