config.js 482 B

123456789101112131415161718
  1. import { defineConfig } from '@umijs/max';
  2. import proxy from './proxy';
  3. import pageRoutes from './router';
  4. export default defineConfig({
  5. antd:{},
  6. model: {},
  7. initialState: {},
  8. request: { dataField: 'data' },
  9. routes: pageRoutes,
  10. publicPath: '/',
  11. proxy,
  12. history: { type: 'hash' },
  13. npmClient: 'npm',
  14. // 只设置 dev 阶段的 sourcemap
  15. // devtool: process.env.NODE_ENV === 'development' ? 'source-map' : false,
  16. devtool: 'source-map', // 开发阶段打开
  17. });