.umirc.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  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: '/directory', component: '@/pages/Directory' },
  22. { path: '/audit', component: '@/pages/AuditLogs' },
  23. { path: '/settings', component: '@/pages/Settings' },
  24. ],
  25. },
  26. ],
  27. npmClient: 'npm',
  28. proxy: {
  29. '/api/admin': {
  30. target: 'http://127.0.0.1:8088',
  31. changeOrigin: true,
  32. },
  33. },
  34. });