-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.umirc.ts
82 lines (80 loc) · 1.78 KB
/
.umirc.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import { defineConfig } from 'umi';
const isProd = process.env.NODE_ENV === 'production';
export default defineConfig({
chainWebpack: (memo) => {
memo.resolve.extensions.add('tsx');
},
nodeModulesTransform: {
type: 'none',
},
hash: true,
autoprefixer: {
browsers: ['> 1%', 'last 2 versions', 'not ie <= 10'],
},
dynamicImport: {
loading: '@/components/loading',
},
theme: {
'primary-color': '#0052FE',
},
extraBabelPlugins: [['import', { libraryName: 'antd', style: 'css' }]],
proxy: {
'/shark/api/': {
target: 'http://127.0.0.1:1753/',
changeOrigin: true,
// pathRewrite: {
// '^/igp': ''
// }
},
'/node/': {
target: 'http://127.0.0.1:1753/',
changeOrigin: true,
},
'/ugp/': {
target: 'http://127.0.0.1:1753/',
changeOrigin: true,
},
},
outputPath: './dist/igp/',
publicPath: '/igp/',
define: {
APP_ENV: isProd ? 'production' : 'development',
},
routes: [
{ path: '/', redirect: '/login' },
{ path: '/login', component: '@/pages/login' },
{
path: '/',
component: '@/containers/layout',
routes: [
{
path: '/editor',
component: '@/pages/editor',
},
{
path: '/chartList',
component: '@/pages/chartList',
},
{
path: '/view',
component: '@/pages/view',
},
],
},
{ path: '*', component: '@/pages/404' },
// {
// path: '/',
// component: '@/containers/layout',
// routes: [
// // {
// // path: '/data/newer',
// // component: '@/pages/data/newer',
// // },
// {
// path: '*',
// component: '@/pages/404',
// },
// ],
// },
],
});