xuchang-screen/.umirc.ts
2023-06-30 11:08:43 +08:00

31 rivejä
540 B
TypeScript

import { defineConfig } from 'umi';
export default defineConfig({
nodeModulesTransform: {
type: 'none',
},
routes: [
{ path: '/', component: '@/pages/index' },
],
proxy: {
'/api': {
target: 'http://localhost:3000',
changeOrigin: true,
pathRewrite: { '^/api': '' },
},
},
fastRefresh: {},
chainWebpack(conf) {
// ....other config
conf.module
.rule('mjs$')
.test(/\.mjs$/)
.include
.add(/node_modules/)
.end()
.type('javascript/auto');
},
});