nocobase/packages/app/.umirc.ts

35 lines
703 B
TypeScript
Raw Normal View History

import { defineConfig } from 'umi';
2021-07-23 10:26:05 +00:00
import dotenv from 'dotenv';
import path from 'path';
dotenv.config({
path: path.resolve(__dirname, '../../.env'),
});
export default defineConfig({
nodeModulesTransform: {
type: 'none',
},
2021-07-23 10:26:05 +00:00
define: {
'process.env.API_URL': process.env.API_URL,
},
2021-09-30 07:16:41 +00:00
proxy: {
'/api': {
'target': `http://localhost:${process.env.API_PORT}/`,
'changeOrigin': true,
'pathRewrite': { '^/api' : '/api' },
},
},
routes: [
2021-05-23 00:38:08 +00:00
{ path: '/', exact: false, component: '@/pages/index' },
],
2021-05-23 00:38:08 +00:00
fastRefresh: {},
2021-08-16 16:15:53 +00:00
locale: {
default: 'zh-CN',
// antd: false,
// title: false,
baseNavigator: false,
baseSeparator: '-',
},
});