.umirc.ts 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import { defineConfig } from '@umijs/max';
  2. export default defineConfig({
  3. antd: {},
  4. access: {},
  5. model: {},
  6. initialState: {},
  7. request: {},
  8. layout: false,
  9. publicPath: process.env.NODE_ENV == 'development' ? '/' : '/gt-dig/',
  10. metas: [
  11. // 配置html禁止缓存
  12. { 'http-equiv': 'pragma', content: 'no-cache' },
  13. { 'http-equiv': 'cache-control', content: 'no-cache' },
  14. { 'http-equiv': 'expires', content: '0' },
  15. { 'http-equiv': 'X-UA-Compatible', content: 'IE=EmulateIE9' },
  16. ],
  17. proxy: {
  18. '/api': {
  19. // target: 'http://47.96.12.136:8888/',
  20. target: 'http://47.96.12.136:8788/',
  21. // target: 'https://work.greentech.com.cn/',
  22. changeOrigin: true,
  23. },
  24. },
  25. routes: [
  26. {
  27. path: '/',
  28. redirect: '/home',
  29. },
  30. {
  31. name: '首页',
  32. path: '/home',
  33. component: './Home',
  34. },
  35. {
  36. name: '工况管理',
  37. path: '/smart/work/:projectId',
  38. component: './Smart',
  39. },
  40. // {
  41. // name: '权限演示',
  42. // path: '/access',
  43. // component: './Access',
  44. // },
  45. // {
  46. // name: ' CRUD 示例',
  47. // path: '/table',
  48. // component: './Table',
  49. // },
  50. ],
  51. npmClient: 'yarn',
  52. });