.umirc.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. // ref: https://umijs.org/config/
  2. export default {
  3. treeShaking: true,
  4. routes: [
  5. {
  6. path: '/',
  7. component: '../layouts/index',
  8. routes: [
  9. { path: '/', component: '../pages/Home' },
  10. // { path: '/detail', component: '../pages/Detail' },
  11. { path: '/transferOut', component: '../pages/TransferOut' },
  12. { path: '/record', component: '../pages/Record' },
  13. { path: '/recharge', component: '../pages/Recharge' }
  14. ]
  15. }
  16. ],
  17. plugins: [
  18. // ref: https://umijs.org/plugin/umi-plugin-react.html
  19. ['umi-plugin-react', {
  20. antd: false,
  21. dva: true,
  22. dynamicImport: false,
  23. dll: false,
  24. hd: true,
  25. routes: {
  26. exclude: [
  27. /models\//,
  28. /services\//,
  29. /model\.(t|j)sx?$/,
  30. /service\.(t|j)sx?$/,
  31. /components\//,
  32. ],
  33. },
  34. }],
  35. ],
  36. lessLoaderOptions: {
  37. javascriptEnabled: true,
  38. },
  39. extraBabelPlugins: [
  40. ["import", { libraryName: "antd-mobile", style: true }] // `style: true` 会加载 less 文件
  41. ],
  42. proxy: {
  43. '/api-app': {
  44. target: 'http://api.starbuds.laylib.com',
  45. changeOrigin: true,
  46. //pathRewrite: { '^/server': '' },
  47. },
  48. '/api-common': {
  49. target: 'http://api.starbuds.laylib.com',
  50. changeOrigin: true,
  51. //pathRewrite: { '^/server': '' },
  52. },
  53. },
  54. hash: true,
  55. outputPath: './wallet'
  56. }