.umirc.ts 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. import { defineConfig } from 'umi';
  2. export default defineConfig({
  3. nodeModulesTransform: {
  4. type: 'none',
  5. },
  6. plugins: ['@alitajs/hd'],
  7. hd: {
  8. theme: {},
  9. px2rem: {
  10. rootValue: 100,
  11. unitPrecision: 5,
  12. propWhiteList: [],
  13. propBlackList: [],
  14. exclude: false,
  15. selectorBlackList: [],
  16. ignoreIdentifier: false,
  17. replace: true,
  18. mediaQuery: true,
  19. minPixelValue: 0,
  20. },
  21. },
  22. extraBabelPlugins: [
  23. ['import', { libraryName: 'antd-mobile', style: true }], // `style: true` 会加载 less 文件
  24. ],
  25. routes: [
  26. { path: '/', component: '@/pages/index', title: '直播下载' },
  27. { path: '/download', component: '@/pages/download', title: '直播下载' },
  28. { path: '/success', component: '@/pages/Success', title: '成功' },
  29. {
  30. path: '/channel/center',
  31. component: '@/pages/MyInviteCenter/MyInviteCenter',
  32. title: '邀好友 赚收益',
  33. },
  34. {
  35. path: '/channel/record',
  36. component: '@/pages/MyInviteCenter/InviteRecord',
  37. title: '邀请明细',
  38. },
  39. {
  40. path: '/channel/banner',
  41. component: '@/pages/MyInviteCenter/Banner',
  42. title: '分享海报',
  43. },
  44. {
  45. path: '/security',
  46. component: '@/components/Security/Security',
  47. title: '人机校验',
  48. },
  49. {
  50. path: '/market',
  51. title: 'TiMi语音',
  52. component: '@/pages/Market.tsx',
  53. },
  54. {
  55. path: '/promote',
  56. title: 'TiMi语音',
  57. component: '@/pages/Promote.tsx',
  58. },
  59. ],
  60. proxy: {
  61. '/api-app': {
  62. target: 'http://api.timichat.net',
  63. //target: 'http://h5.paqukeji.com',
  64. changeOrigin: true,
  65. //pathRewrite: { '^/server': '' },
  66. },
  67. '/api-common': {
  68. target: 'http://api.timichat.net',
  69. //target: 'http://h5.paqukeji.com',
  70. changeOrigin: true,
  71. //pathRewrite: { '^/server': '' },
  72. },
  73. },
  74. hash: true,
  75. outputPath: './iv',
  76. //CDN引入
  77. links: [
  78. {
  79. href:
  80. 'http://sp.qn.timichat.com/static/antd-mobile/2.3.1/antd-mobile.min.css',
  81. rel: 'stylesheet',
  82. },
  83. ],
  84. headScripts: [
  85. //react
  86. 'http://sp.qn.timichat.com/static/react/16.9.0/react.production.min.js',
  87. //react-dom
  88. 'http://sp.qn.timichat.com/static/react/16.9.0/react-dom.production.min.js',
  89. //antd-mobile
  90. 'http://sp.qn.timichat.com/static/antd-mobile/2.3.1/antd-mobile.min.js',
  91. ],
  92. });