.umirc.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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.paqukeji.com/static/react/16.9.0/react.production.min.js',
  45. //react-dom
  46. '//sp.qn.paqukeji.com/static/react/16.9.0/react-dom.production.min.js',
  47. //antd-mobile
  48. '//sp.qn.paqukeji.com/static/antd-mobile/2.3.1/antd-mobile.min.js',
  49. // //lottie动画
  50. // '//sp.qn.paqukeji.com/static/bodymovin/5.6.8/lottie.min.js'
  51. ],
  52. //CDN引入
  53. links: [
  54. { href: '//sp.qn.paqukeji.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://api.starbuds.laylib.com',
  67. // target: 'http://h5.paqukeji.com',
  68. changeOrigin: true,
  69. //pathRewrite: { '^/server': '' },
  70. },
  71. '/api-common': {
  72. target: 'http://api.starbuds.laylib.com',
  73. // target: 'http://h5.paqukeji.com',
  74. changeOrigin: true,
  75. //pathRewrite: { '^/server': '' },
  76. },
  77. '/wx': {
  78. target: 'https://api.weixin.qq.com',
  79. //target: 'http://h5.paqukeji.com',
  80. changeOrigin: true,
  81. pathRewrite: { '^/wx': '' },
  82. },
  83. },
  84. hash: true,
  85. outputPath: './live-h5',
  86. publicPath: '//sp.qn.paqukeji.com/live-h5/',
  87. externals: {
  88. 'react': 'React',
  89. 'react-dom': 'ReactDOM',
  90. 'antd-mobile': 'antd-mobile',
  91. 'lottie-web': 'lottie'
  92. },
  93. theme: {
  94. "brand-primary": "#ff4d5cff",
  95. "color-text-base": "#333",
  96. "brand-primary-tap": "rgba(255, 77, 92, 0.8)"
  97. },
  98. }