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.

.umirc.ts 867B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import { defineConfig } from 'umi';
  2. import { appName } from './src/conf.json';
  3. import routes from './src/routes';
  4. export default defineConfig({
  5. title: appName,
  6. outputPath: 'dist',
  7. // alias: { '@': './src' },
  8. npmClient: 'npm',
  9. base: '/',
  10. routes,
  11. publicPath: '/',
  12. esbuildMinifyIIFE: true,
  13. icons: {},
  14. hash: true,
  15. favicons: ['/logo.svg'],
  16. clickToComponent: {},
  17. history: {
  18. type: 'browser',
  19. },
  20. plugins: ['@react-dev-inspector/umi4-plugin', '@umijs/plugins/dist/dva'],
  21. dva: {},
  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://localhost:9380/',
  33. changeOrigin: true,
  34. ws: true,
  35. logger: console,
  36. // pathRewrite: { '^/v1': '/v1' },
  37. },
  38. },
  39. });