.umirc.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import { defineConfig } from 'umi';
  2. export default defineConfig({
  3. nodeModulesTransform: {
  4. type: 'none',
  5. },
  6. routes: [
  7. {
  8. path: '/',
  9. component: '../layouts/index',
  10. routes: [
  11. { path: '/', component: '../pages/index' },
  12. { path: '/vip', component: '../pages/vip' },
  13. { path: '/login', component: '../pages/login' },
  14. { path: '/payRecharge', component: '../pages/recharge' },
  15. {
  16. path: '/recharge/callback/alipay',
  17. component: '../pages/recharge/callback/alipay',
  18. },
  19. {
  20. path: '/recharge/callback/wechat',
  21. component: '../pages/recharge/callback/wechat',
  22. },
  23. ],
  24. },
  25. ],
  26. fastRefresh: {},
  27. define: {
  28. 'process.env': process.env
  29. },
  30. outputPath: './pay',
  31. proxy: {
  32. '/api-app': {
  33. // target: 'http://api.timichat.net/api-app/',
  34. target: 'http://localhost:9201/api-app',
  35. changeOrigin: true,
  36. pathRewrite: { '^/api-app': '' },
  37. },
  38. '/api-common': {
  39. // target: 'http://api.timichat.net',
  40. target: 'http://localhost:9230',
  41. changeOrigin: true,
  42. },
  43. },
  44. hash: true,
  45. });