.umirc.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. // ref: https://umijs.org/config/
  2. export default {
  3. treeShaking: true,
  4. routes: [
  5. {
  6. path: '/',
  7. component: '../layouts/index',
  8. routes: [
  9. { path: '/first', component: '../pages/Home/First' },//首次充值
  10. { path: '/daily', component: '../pages/Home/Daily' },//每日充值
  11. { path: '/combine', component: '../pages/Combine/Combine' }//充值活动(首充+每充)
  12. ]
  13. }
  14. ],
  15. plugins: [
  16. // ref: https://umijs.org/plugin/umi-plugin-react.html
  17. ['umi-plugin-react', {
  18. antd: false,
  19. dva: true,
  20. dynamicImport: false,
  21. title: '',
  22. dll: false,
  23. hd: true,
  24. locale: {
  25. default: 'zh-CN', //默认语言 zh-CN,如果 baseSeparator 设置为 _,则默认为 zh_CN
  26. baseNavigator: true, // 为true时,用navigator.language的值作为默认语言
  27. antd: true, // 是否启用antd的<LocaleProvider />
  28. baseSeparator: '-', // 语言默认分割符 -
  29. },
  30. routes: {
  31. exclude: [
  32. /models\//,
  33. /services\//,
  34. /model\.(t|j)sx?$/,
  35. /service\.(t|j)sx?$/,
  36. /components\//,
  37. ],
  38. },
  39. }],
  40. ],
  41. lessLoaderOptions: {
  42. javascriptEnabled: true,
  43. },
  44. extraBabelPlugins: [
  45. ["import", { libraryName: "antd-mobile", style: true }] // `style: true` 会加载 less 文件
  46. ],
  47. proxy: {
  48. '/api-app': {
  49. //target: 'http://api.dev.hidouyou.com',
  50. target: 'http://localhost:9201',
  51. changeOrigin: true,
  52. //pathRewrite: { '^/server': '' },
  53. },
  54. '/api-common': {
  55. //target: 'http://api.dev.hidouyou.com',
  56. target: 'http://localhost:9230',
  57. changeOrigin: true,
  58. //pathRewrite: { '^/server': '' },
  59. },
  60. },
  61. hash: true,
  62. outputPath: './recharge'
  63. }