.umirc.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. const path = require('path');
  2. const server = 'http://localhost:3000';
  3. // ref: https://umijs.org/config/
  4. export default {
  5. plugins: [
  6. // ref: https://umijs.org/plugin/umi-plugin-react.html
  7. ['umi-plugin-react', {
  8. antd: true,
  9. dva: true,
  10. dynamicImport: false,
  11. dll: true,
  12. routes: {
  13. exclude: [
  14. /model\.(j|t)sx?$/,
  15. /service\.(j|t)sx?$/,
  16. /models\//,
  17. /components\//,
  18. /services\//,
  19. ]
  20. },
  21. hardSource: false,
  22. }],
  23. ],
  24. alias:{
  25. components:path.resolve(__dirname,'src/components'),
  26. utils:path.resolve(__dirname,'src/utils'),
  27. services:path.resolve(__dirname,'src/services'),
  28. models:path.resolve(__dirname,'src/models'),
  29. // themes:path.resolve(__dirname,'src/themes'),
  30. images:path.resolve(__dirname,'src/assets')
  31. },
  32. // proxy: {
  33. // "/api": {
  34. // "target": 'http://192.168.2.120:8081',
  35. // "changeOrigin": true,
  36. // "pathRewrite": { "^/api" : "/api" }
  37. // }
  38. // }
  39. }