.umirc.ts 568 B

1234567891011121314151617181920212223242526
  1. import { defineConfig } from 'umi';
  2. export default defineConfig({
  3. favicon: './favicon.ico',
  4. routes: [
  5. {
  6. exact: false, path: '/', component: '@/layouts/index',
  7. routes: [
  8. { exact: true, path: '/', component: '@/pages/Home' },
  9. ],
  10. },
  11. ],
  12. antd: {
  13. dark: false,
  14. },
  15. chainWebpack(memo, { env, webpack, createCSSRule }) {
  16. // 设置 alias
  17. memo.resolve.alias.set('foo', '/tmp/a/b/foo');
  18. //memo.resolve.extensions.add('.tsx')
  19. memo.merge({
  20. resolve: {
  21. extensions: [".tsx", ".ts"]
  22. }
  23. })
  24. }
  25. });