.umirc.ts 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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: '/success', component: '@/pages/Success', title: '成功' },
  28. {
  29. path: '/channel/center',
  30. component: '@/pages/MyInviteCenter/MyInviteCenter',
  31. title: '邀好友 赚收益',
  32. },
  33. {
  34. path: '/channel/record',
  35. component: '@/pages/MyInviteCenter/InviteRecord',
  36. title: '邀请明细',
  37. },
  38. {
  39. path: '/channel/banner',
  40. component: '@/pages/MyInviteCenter/Banner',
  41. title: '分享海报',
  42. },
  43. {
  44. path: '/security',
  45. component: '@/components/Security/Security',
  46. title: '人机校验',
  47. },
  48. ],
  49. proxy: {
  50. '/api-app': {
  51. target: 'http://api.starbuds.laylib.com',
  52. //target: 'http://h5.paqukeji.com',
  53. changeOrigin: true,
  54. //pathRewrite: { '^/server': '' },
  55. },
  56. '/api-common': {
  57. target: 'http://api.starbuds.laylib.com',
  58. //target: 'http://h5.paqukeji.com',
  59. changeOrigin: true,
  60. //pathRewrite: { '^/server': '' },
  61. },
  62. },
  63. hash: true,
  64. outputPath: './invite',
  65. //CDN引入
  66. links: [
  67. {
  68. href:
  69. 'http://sp.qn.timichat.com/static/antd-mobile/2.3.1/antd-mobile.min.css',
  70. rel: 'stylesheet',
  71. },
  72. ],
  73. headScripts: [
  74. //react
  75. 'http://sp.qn.timichat.com/static/react/16.9.0/react.production.min.js',
  76. //react-dom
  77. 'http://sp.qn.timichat.com/static/react/16.9.0/react-dom.production.min.js',
  78. //antd-mobile
  79. 'http://sp.qn.timichat.com/static/antd-mobile/2.3.1/antd-mobile.min.js',
  80. ],
  81. });