.umirc.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. import px2rem from 'postcss-plugin-px2rem'
  2. const autoprefixer = require('autoprefixer')
  3. // ref: https://umijs.org/config/
  4. export default {
  5. treeShaking: true,
  6. routes: [
  7. {
  8. path: '/',
  9. redirect: '/giftsrank/home'
  10. },
  11. {
  12. path: '/giftsrank/home',
  13. name: '星芽',
  14. component: '../pages/GiftsRank/GiftsRank'
  15. },
  16. {
  17. path: '/giftsrank/rules',
  18. name: '星芽-排名规则',
  19. component: '../pages/GiftsRank/RankRule'
  20. }
  21. ],
  22. plugins: [
  23. // ref: https://umijs.org/plugin/umi-plugin-react.html
  24. ['umi-plugin-react', {
  25. antd: false,
  26. dva: false,
  27. dynamicImport: false,
  28. title: '星芽',
  29. dll: false,
  30. hd: false,
  31. routes: {
  32. exclude: [
  33. /components\//,
  34. ],
  35. },
  36. }],
  37. ],
  38. extraPostCSSPlugins: [
  39. autoprefixer({
  40. flexbox: true
  41. }),
  42. px2rem({
  43. rootValue: 37.5,
  44. // propBlackList:['border','border-top','border-left','border-right','border-bottom','border-radius','font-size'], // 这些属性不需要转换
  45. selectorBlackList:['t_npx']
  46. })
  47. ],
  48. hash: true,
  49. // exportStatic: {
  50. // htmlSuffix: true
  51. // },
  52. proxy: {
  53. '/ajax': {
  54. target: 'http://47.111.11.110:8001/',
  55. // target: 'http://www.yiqi1717.com/',
  56. changeOrigin: true,
  57. // "pathRewrite": { "^/api": "" }
  58. },
  59. '/active_bank': {
  60. // target: 'http://www.yiqi1717.com/',
  61. target: 'http://47.111.0.38:8002/',
  62. changeOrigin: true,
  63. }
  64. },
  65. // publicPath: '/themes/default/template/h5-activity/',
  66. publicPath: '/',
  67. outputPath: './ranks',
  68. copy: [
  69. {
  70. "from": "public",
  71. "to": ""
  72. }
  73. ]
  74. }