.umirc.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. // ref: https://umijs.org/config/
  2. export default {
  3. treeShaking: true,
  4. hash: true,
  5. routes: [
  6. {
  7. path: '/recharge',
  8. component: '../layouts/BlankLayout',
  9. name: '支付',
  10. routes: [
  11. {
  12. path: '/recharge/home',
  13. name: '支付',
  14. component: '../pages/Recharge/Recharge'
  15. },
  16. {
  17. path: '/recharge/callback',
  18. name: '回调页面',
  19. routes: [
  20. {
  21. path: '/recharge/callback/alipay',
  22. name: '支付宝回调页面',
  23. component: '../pages/AlipayCallback/AlipayCallback'
  24. }
  25. ]
  26. }
  27. ]
  28. },
  29. { path: '/', redirect: '/recharge/home' },
  30. {
  31. path: '/',
  32. component: '../layouts/BlankLayout',
  33. routes: [
  34. { path: '/', component: '../pages/Home' },
  35. ]
  36. },
  37. ],
  38. plugins: [
  39. // ref: https://umijs.org/plugin/umi-plugin-react.html
  40. ['umi-plugin-react', {
  41. antd: true,
  42. dva: false,
  43. dynamicImport: false, // { webpackChunkName: true },
  44. title: 'xk-umi',
  45. dll: true,
  46. routes: {
  47. exclude: [
  48. /models\//,
  49. /services\//,
  50. /model\.(t|j)sx?$/,
  51. /service\.(t|j)sx?$/,
  52. /components\//,
  53. ],
  54. },
  55. lessLoaderOptions: {
  56. javascriptEnabled: true,
  57. }
  58. }],
  59. ],
  60. outputPath: './pay-pc',
  61. proxy: {
  62. '/api-manage': {
  63. target: 'http://api.starbuds.laylib.com',
  64. changeOrigin: true,
  65. //pathRewrite: { '^/server': '' },
  66. },
  67. '/api-common': {
  68. target: 'http://api.starbuds.laylib.com',
  69. changeOrigin: true,
  70. //pathRewrite: { '^/server': '' },
  71. },
  72. '/api-app': {
  73. target: 'http://api.starbuds.laylib.com',
  74. changeOrigin: true,
  75. //pathRewrite: { '^/server': '' },
  76. }
  77. },
  78. targets: {
  79. ie: 9,
  80. }
  81. }