- Added HeaderLayout component for the application header. - Introduced KeepAliveViewport for managing tab states and rendering. - Created TabNav for tab navigation with animated indicator. - Removed old Tabs component in favor of new layout structure. - Updated routing with AppRouter and defined appTabs for navigation. - Enhanced theme context to manage dark mode styles. - Added new UI components: Badge, Button, Separator, and Tabs. - Refactored pages to utilize new layout components and improve responsiveness. - Updated global styles for better theming and layout consistency. - Introduced TypeScript path aliases for cleaner imports.
32 lines
836 B
TypeScript
32 lines
836 B
TypeScript
import path from 'node:path'
|
|
import { defineConfig, loadEnv } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig(({ mode }) => {
|
|
const env = loadEnv(mode, process.cwd(), '')
|
|
// Default local frontend development to the local backend unless explicitly overridden.
|
|
const apiHost = env.API_HOST || '127.0.0.1'
|
|
const apiPort = env.API_PORT || '8000'
|
|
const proxyTarget = env.VITE_API_PROXY_TARGET || `http://${apiHost}:${apiPort}`
|
|
|
|
return {
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
},
|
|
},
|
|
server: {
|
|
host: '0.0.0.0',
|
|
port: Number(env.FRONTEND_PORT || 5173),
|
|
proxy: {
|
|
'/api': {
|
|
target: proxyTarget,
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
}
|
|
})
|