.umirc.ts 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. import { defineConfig } from "umi";
  2. export default defineConfig({
  3. base: "/",
  4. publicPath: process.env.NODE_ENV === "production" ? "./" : "/",
  5. outputPath: "marketplace",
  6. esbuildMinifyIIFE: true,
  7. favicons: [],
  8. styles: ["//at.alicdn.com/t/c/font_4840729_ot8ca1ti90n.css"],
  9. scripts: ["//at.alicdn.com/t/c/font_4840729_qpwqs1eruu.js"],
  10. model: {},
  11. metas: [
  12. {
  13. name: "viewport",
  14. content:
  15. "width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no",
  16. },
  17. ],
  18. history: {
  19. type: "hash",
  20. },
  21. plugins: [
  22. require.resolve('@umijs/plugins/dist/unocss'),
  23. require.resolve('@umijs/plugins/dist/model'),
  24. require.resolve('@umijs/plugins/dist/initial-state'),
  25. require.resolve('@umijs/plugins/dist/request'),
  26. ],
  27. // model: {},
  28. unocss: {
  29. watch: ["src/**/*.tsx"],
  30. },
  31. request: {
  32. dataField: '',
  33. },
  34. proxy: {
  35. "/api": {
  36. target: "http://a.dev.jbpm.shalu.com/",
  37. changeOrigin: true,
  38. pathRewrite: { "^/api": "" },
  39. },
  40. },
  41. routes: [
  42. {
  43. path: "/",
  44. redirect: "/application",
  45. },
  46. {
  47. path: "/application",
  48. component: "application",
  49. },
  50. {
  51. path: "/template",
  52. component: "template",
  53. },
  54. {
  55. // type: application or template
  56. path: "/detail/:type/:id",
  57. component: "detail",
  58. },
  59. {
  60. path: '/management',
  61. component: 'management',
  62. layout: false
  63. },
  64. {
  65. path: '/ai',
  66. component: 'ai',
  67. layout: false
  68. },
  69. {
  70. path: '/apply',
  71. component: 'apply',
  72. layout: false
  73. },
  74. {
  75. path: '*',
  76. component: '404',
  77. layout: false
  78. }
  79. ],
  80. npmClient: "pnpm",
  81. });