.umirc.ts 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import { defineConfig } from "umi";
  2. export default defineConfig({
  3. base: '/',
  4. publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
  5. outputPath: 'systemDesign',
  6. esbuildMinifyIIFE: true,
  7. favicons: [
  8. '/favicon.ico'
  9. ],
  10. styles: [
  11. '//at.alicdn.com/t/c/font_4676747_ild1695qz8.css'
  12. ],
  13. metas: [
  14. { name: 'viewport', content: 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' }
  15. ],
  16. scripts: [
  17. // 字体加载
  18. // '//ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js'
  19. '//at.alicdn.com/t/c/font_4676747_dwa7i924a0c.js'
  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. request: {
  28. dataField: '',
  29. },
  30. proxy: {
  31. '/api': {
  32. 'target': 'http://ab.dev.jbpm.shalu.com/',
  33. 'changeOrigin': true,
  34. 'pathRewrite': { '^/api' : '' },
  35. },
  36. },
  37. model: {},
  38. unocss: {
  39. watch: ['src/**/*.tsx']
  40. },
  41. icons: {
  42. autoInstall: {}
  43. },
  44. history: { type: 'hash' },
  45. routes: [
  46. { path: "/", component: "home" },
  47. { path: "/flow/:id", component: "flow" },
  48. { path: "/mindmap/:id", component: "mindmap" },
  49. { path: "/*", component: '404' }
  50. ],
  51. npmClient: 'pnpm'
  52. });