.umirc.ts 1018 B

12345678910111213141516171819202122232425262728293031323334
  1. import { defineConfig } from 'umi';
  2. export default defineConfig({
  3. antd: {},
  4. base: '/admin/',
  5. publicPath: '/admin/',
  6. history: { type: 'browser' },
  7. hash: true,
  8. routes: [
  9. { path: '/login', component: '@/pages/Login' },
  10. { path: '/change-password', component: '@/pages/ChangePassword' },
  11. {
  12. path: '/',
  13. component: '@/layouts/AdminLayout',
  14. routes: [
  15. { path: '/', redirect: '/dashboard' },
  16. { path: '/dashboard', component: '@/pages/Dashboard' },
  17. { path: '/chats', component: '@/pages/Chats' },
  18. { path: '/chats/:chatId', component: '@/pages/ChatDetail' },
  19. { path: '/giveaways', component: '@/pages/Giveaways' },
  20. { path: '/points', component: '@/pages/Points' },
  21. { path: '/audit', component: '@/pages/AuditLogs' },
  22. { path: '/settings', component: '@/pages/Settings' },
  23. ],
  24. },
  25. ],
  26. npmClient: 'npm',
  27. proxy: {
  28. '/api/admin': {
  29. target: 'http://127.0.0.1:8088',
  30. changeOrigin: true,
  31. },
  32. },
  33. });