Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

.umirc.ts 1.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import path from 'path';
  2. import { defineConfig } from 'umi';
  3. import { appName } from './src/conf.json';
  4. import routes from './src/routes';
  5. export default defineConfig({
  6. title: appName,
  7. outputPath: 'dist',
  8. alias: { '@parent': path.resolve(__dirname, '../') },
  9. npmClient: 'npm',
  10. base: '/',
  11. routes,
  12. publicPath: '/',
  13. esbuildMinifyIIFE: true,
  14. icons: {},
  15. hash: true,
  16. favicons: ['/logo.svg'],
  17. clickToComponent: {},
  18. history: {
  19. type: 'browser',
  20. },
  21. plugins: ['@react-dev-inspector/umi4-plugin'],
  22. jsMinifier: 'terser',
  23. lessLoader: {
  24. modifyVars: {
  25. hack: `true; @import "~@/less/index.less";`,
  26. },
  27. },
  28. devtool: 'source-map',
  29. copy: ['src/conf.json'],
  30. proxy: [
  31. {
  32. context: ['/api', '/v1'],
  33. target: 'http://127.0.0.1:9380/',
  34. changeOrigin: true,
  35. ws: true,
  36. logger: console,
  37. // pathRewrite: { '^/v1': '/v1' },
  38. },
  39. ],
  40. chainWebpack(memo, args) {
  41. memo.module.rule('markdown').test(/\.md$/).type('asset/source');
  42. return memo;
  43. },
  44. });