.umirc.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. // ref: https://umijs.org/config/
  2. export default {
  3. treeShaking: true,
  4. routes: [
  5. {
  6. path: '/page/videoDetail',
  7. component: '../pages/Video/VideoDetail'
  8. },
  9. {
  10. path: '/',
  11. component: '../layouts/index',
  12. routes: [
  13. { path: '/', component: '../pages/Live' },
  14. { path: '/download', component: '../pages/Download/Download' },
  15. { path: '/avdownload', component: '../pages/SexyDownload/SexyDownload' },
  16. { path: '/tui_l', component: '../pages/SexyDownload/SexyDownload' },
  17. { path: '/download/channel', component: '../pages/Download/Download2' },
  18. { path: '/video', component: '../pages/Video/VideoDetail' },
  19. { path: '/recharge', component: '../pages/Recharge/Recharge' },
  20. { path: '/recharge/login', component: '../pages/Recharge/RechargeLogin' }
  21. ]
  22. }
  23. ],
  24. plugins: [
  25. // ref: https://umijs.org/plugin/umi-plugin-react.html
  26. ['umi-plugin-react', {
  27. antd: false,
  28. dva: true,
  29. dynamicImport: false,
  30. title: '',
  31. dll: false,
  32. hd: true,
  33. routes: {
  34. exclude: [
  35. /models\//,
  36. /services\//,
  37. /model\.(t|j)sx?$/,
  38. /service\.(t|j)sx?$/,
  39. /components\//,
  40. ],
  41. },
  42. headScripts: [
  43. //react
  44. '//sp.qn.panygo.com/static/react/16.9.0/react.production.min.js',
  45. //react-dom
  46. '//sp.qn.panygo.com/static/react/16.9.0/react-dom.production.min.js',
  47. //antd-mobile
  48. '//sp.qn.panygo.com/static/antd-mobile/2.3.1/antd-mobile.min.js',
  49. // //lottie动画
  50. // '//sp.qn.panygo.com/static/bodymovin/5.6.8/lottie.min.js'
  51. ],
  52. //CDN引入
  53. links: [
  54. { href: '//sp.qn.panygo.com/static/antd-mobile/2.3.1/antd-mobile.min.css', rel: 'stylesheet' }
  55. ],
  56. }],
  57. ],
  58. lessLoaderOptions: {
  59. javascriptEnabled: true,
  60. },
  61. extraBabelPlugins: [
  62. ["import", { libraryName: "antd-mobile", style: true }] // `style: true` 会加载 less 文件
  63. ],
  64. proxy: {
  65. '/api-app': {
  66. // target: 'http://h5.timichat.net',//测试
  67. target: 'http://localhost:9201',
  68. // target: 'http://h5.timichat.com',//正式
  69. changeOrigin: true,
  70. //pathRewrite: { '^/server': '' },
  71. },
  72. '/api-common': {
  73. //target: 'http://api.starbuds.laylib.com',
  74. // target: 'http://h5.timichat.com',
  75. target: 'http://localhost:9230',
  76. changeOrigin: true,
  77. //pathRewrite: { '^/server': '' },
  78. },
  79. '/wx': {
  80. target: 'https://api.weixin.qq.com',
  81. //target: 'http://h5.paqukeji.com',
  82. changeOrigin: true,
  83. pathRewrite: { '^/wx': '' },
  84. },
  85. },
  86. hash: true,
  87. outputPath: './live-h5',
  88. publicPath: '/',
  89. externals: {
  90. 'react': 'React',
  91. 'react-dom': 'ReactDOM',
  92. 'antd-mobile': 'antd-mobile',
  93. 'lottie-web': 'lottie'
  94. },
  95. theme: {
  96. "brand-primary": "#ff4d5cff",
  97. "color-text-base": "#333",
  98. "brand-primary-tap": "rgba(255, 77, 92, 0.8)"
  99. },
  100. }