.umirc.ts 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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: '*',
  71. component: '404',
  72. layout: false
  73. }
  74. ],
  75. npmClient: "pnpm",
  76. });