xuchang-screen/.umirc.ts

31 righe
540 B
TypeScript

2023-06-30 11:08:43 +08:00
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');
},
});