.umirc.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import { resolve } from 'path';
  2. export default {
  3. // for query-string@6 https://github.com/sorrycc/blog/issues/68
  4. es5ImcompatibleVersions: true,
  5. plugins: [
  6. [
  7. 'umi-plugin-react',
  8. {
  9. dva: true,
  10. antd: true,
  11. routes: {
  12. exclude: [
  13. /model\.(j|t)sx?$/,
  14. /service\.(j|t)sx?$/,
  15. /models\//,
  16. /components\//,
  17. /services\//
  18. ]
  19. },
  20. dll: {
  21. exclude: [],
  22. include: ["dva", "dva/router", "dva/saga", "dva/fetch", "antd/es"]
  23. }
  24. }
  25. ]
  26. ],
  27. theme: "./theme.config.js",
  28. proxy: {
  29. // "/api/v1/weather": {
  30. // "target": "https://api.seniverse.com/",
  31. // "changeOrigin": true,
  32. // "pathRewrite": { "^/api/v1/weather": "/v3/weather" }
  33. // }
  34. },
  35. alias: {
  36. themes: resolve(__dirname, './src/themes'),
  37. components: resolve(__dirname,"./src/components"),
  38. utils: resolve(__dirname,"./src/utils"),
  39. config: resolve(__dirname,"./src/utils/config"),
  40. services: resolve(__dirname,"./src/services"),
  41. models: resolve(__dirname,"./src/models"),
  42. routes: resolve(__dirname,"./src/routes"),
  43. },
  44. urlLoaderExcludes: [
  45. /\.svg$/,
  46. ],
  47. }