.umirc.js 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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. { path: '/recharge/logindev', component: '../pages/Recharge/RechargeLogindev' },
  22. { path: '/rechargedev', component: '../pages/Recharge/Rechargedev' },
  23. ]
  24. }
  25. ],
  26. plugins: [
  27. // ref: https://umijs.org/plugin/umi-plugin-react.html
  28. ['umi-plugin-react', {
  29. antd: false,
  30. dva: true,
  31. dynamicImport: false,
  32. title: '',
  33. dll: false,
  34. hd: true,
  35. routes: {
  36. exclude: [
  37. /models\//,
  38. /services\//,
  39. /model\.(t|j)sx?$/,
  40. /service\.(t|j)sx?$/,
  41. /components\//,
  42. ],
  43. },
  44. headScripts: [
  45. //react
  46. '//sp.qn.timichat.com/static/react/16.9.0/react.production.min.js',
  47. //react-dom
  48. '//sp.qn.timichat.com/static/react/16.9.0/react-dom.production.min.js',
  49. //antd-mobile
  50. '//sp.qn.timichat.com/static/antd-mobile/2.3.1/antd-mobile.min.js',
  51. // //lottie动画
  52. // '//sp.qn.timichat.com/static/bodymovin/5.6.8/lottie.min.js'
  53. ],
  54. //CDN引入
  55. links: [
  56. { href: '//sp.qn.timichat.com/static/antd-mobile/2.3.1/antd-mobile.min.css', rel: 'stylesheet' }
  57. ],
  58. }],
  59. ],
  60. lessLoaderOptions: {
  61. javascriptEnabled: true,
  62. },
  63. extraBabelPlugins: [
  64. ["import", { libraryName: "antd-mobile", style: true }] // `style: true` 会加载 less 文件
  65. ],
  66. define: {
  67. 'process.env': process.env
  68. },
  69. proxy: {
  70. '/api-app': {
  71. target: 'http://h5.timichat.net',//测试
  72. // target: 'http://h5.timichat.com',//正式
  73. changeOrigin: true,
  74. //pathRewrite: { '^/server': '' },
  75. },
  76. '/api-common': {
  77. //target: 'http://api.starbuds.laylib.com',
  78. target: 'http://h5.timichat.net',
  79. changeOrigin: true,
  80. //pathRewrite: { '^/server': '' },
  81. },
  82. '/wx': {
  83. target: 'https://api.weixin.qq.com',
  84. //target: 'http://h5.paqukeji.com',
  85. changeOrigin: true,
  86. pathRewrite: { '^/wx': '' },
  87. },
  88. },
  89. hash: true,
  90. outputPath: './wxpay',
  91. publicPath: '/',
  92. externals: {
  93. 'react': 'React',
  94. 'react-dom': 'ReactDOM',
  95. 'antd-mobile': 'antd-mobile',
  96. 'lottie-web': 'lottie'
  97. },
  98. theme: {
  99. "brand-primary": "#ff4d5cff",
  100. "color-text-base": "#333",
  101. "brand-primary-tap": "rgba(255, 77, 92, 0.8)"
  102. },
  103. }