Performance improvements: - Vite build: manual chunks, terser minification, optimizeDeps - API response caching with 5s TTL via axios interceptors - React.memo for SidebarMenuItem, useCallback for handlers - CSS classes replacing inline styles to reduce reflows UI/UX enhancements (inspired by SAP Fiori, Linear, Feishu): - Dashboard: trend indicators, sparkline charts, CountUp animation on stat cards - Dashboard: pending tasks section with priority labels - Dashboard: recent activity timeline - Design system tokens: trend colors, line-height, dark mode refinements - Enhanced quick actions with hover animations Accessibility (Lighthouse 100/100): - Skip-to-content link, ARIA landmarks, heading hierarchy - prefers-reduced-motion support, focus-visible states - Color contrast fixes: all text meets 4.5:1 ratio - Keyboard navigation for stat cards and task items SEO: meta theme-color, format-detection, robots.txt
56 lines
1.2 KiB
TypeScript
56 lines
1.2 KiB
TypeScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
|
|
export default defineConfig({
|
|
plugins: [react(), tailwindcss()],
|
|
server: {
|
|
port: 5173,
|
|
proxy: {
|
|
"/api": {
|
|
target: "http://localhost:3000",
|
|
changeOrigin: true,
|
|
},
|
|
"/ws": {
|
|
target: "ws://localhost:3000",
|
|
ws: true,
|
|
},
|
|
},
|
|
},
|
|
build: {
|
|
target: "es2023",
|
|
cssTarget: "chrome120",
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
"vendor-react": ["react", "react-dom", "react-router-dom"],
|
|
"vendor-antd": ["antd", "@ant-design/icons"],
|
|
"vendor-utils": ["axios", "zustand"],
|
|
},
|
|
},
|
|
},
|
|
minify: "terser",
|
|
terserOptions: {
|
|
compress: {
|
|
drop_console: true,
|
|
drop_debugger: true,
|
|
pure_funcs: ["console.log", "console.info", "console.debug"],
|
|
},
|
|
},
|
|
sourcemap: false,
|
|
reportCompressedSize: false,
|
|
chunkSizeWarningLimit: 600,
|
|
},
|
|
optimizeDeps: {
|
|
include: [
|
|
"react",
|
|
"react-dom",
|
|
"react-router-dom",
|
|
"antd",
|
|
"@ant-design/icons",
|
|
"axios",
|
|
"zustand",
|
|
],
|
|
},
|
|
});
|