.umirc.js 1.7 KB

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