.umirc.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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.starbuds.laylib.com',
  50. changeOrigin: true,
  51. //pathRewrite: { '^/server': '' },
  52. },
  53. '/api-common': {
  54. target: 'http://api.starbuds.laylib.com',
  55. changeOrigin: true,
  56. //pathRewrite: { '^/server': '' },
  57. },
  58. },
  59. hash: true,
  60. outputPath: './dayRecharge'
  61. }