You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. '/v1': {
  32. target: 'http://127.0.0.1:9456/',
  33. changeOrigin: true,
  34. ws: true,
  35. logger: console,
  36. // pathRewrite: { '^/v1': '/v1' },
  37. },
  38. },
  39. chainWebpack(memo, args) {
  40. memo.module.rule('markdown').test(/\.md$/).type('asset/source');
  41. return memo;
  42. },
  43. });