.umirc.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. // ref: https://umijs.org/config/
  2. export default {
  3. treeShaking: true,
  4. routes: [
  5. {
  6. path: '/',
  7. component: '../layouts/index',
  8. routes: [
  9. {
  10. path: '/tui_l',
  11. name: '下载',
  12. component: '../pages/TuiDownload/Download'
  13. },
  14. {
  15. path: '/',
  16. name: '下载',
  17. component: '../pages/RegularDownload/Download'
  18. },
  19. {
  20. path: '/avdownload',
  21. name: '下载',
  22. component: '../pages/SexyDownload/SexyDownload'
  23. },
  24. ]
  25. }
  26. ],
  27. plugins: [
  28. // ref: https://umijs.org/plugin/umi-plugin-react.html
  29. ['umi-plugin-react', {
  30. antd: true,
  31. dva: false,
  32. dynamicImport: false,
  33. dll: false,
  34. hd: true,
  35. routes: {
  36. exclude: [
  37. /components\//,
  38. ],
  39. },
  40. }],
  41. ],
  42. hash: true,
  43. extraBabelPlugins: [
  44. ["import", { libraryName: "antd-mobile", style: true }] // `style: true` 会加载 less 文件
  45. ],
  46. proxy: {
  47. '/api-app': {
  48. target: 'http://api.starbuds.laylib.com',
  49. //target: 'http://h5.paqukeji.com',
  50. changeOrigin: true,
  51. },
  52. '/api-common': {
  53. target: 'http://api.starbuds.laylib.com',
  54. //target: 'http://h5.paqukeji.com',
  55. changeOrigin: true,
  56. },
  57. },
  58. //publicPath: '/themes/default/template/app-download/',
  59. outputPath: './download-h5'
  60. }