in tsfile-viewer-web-frontend/config/config.js [23:149]
export default defineConfig({
hash: true,
antd: {},
dva: {
hmr: true,
},
layout: {
// https://umijs.org/zh-CN/plugins/plugin-layout
locale: true,
siderWidth: 208,
...defaultSettings,
},
// https://umijs.org/zh-CN/plugins/plugin-locale
locale: {
// default zh-CN
default: 'zh-CN',
antd: true,
// default true, when it is true, will use `navigator.language` overwrite default
baseNavigator: true,
},
dynamicImport: {
loading: '@ant-design/pro-layout/es/PageLoading',
},
targets: {
ie: 11,
},
// umi routes: https://umijs.org/docs/routing
routes: [
{
path: '/',
component: 'Welcome'
},
{
path: '/tsfile-tool/v2/',
name: 'tsfile-tool',
icon: 'FileOutlined',
component: './tsfile-tool/v2',
},
{
name: 'exception',
icon: 'warning',
path: '/exception',
hideInMenu: true,
routes: [
{
name: '403',
icon: 'smile',
path: '/exception/403',
component: './exception/403',
},
{
name: '404',
icon: 'smile',
path: '/exception/404',
component: './exception/404',
},
{
name: '500',
icon: 'smile',
path: '/exception/500',
component: './exception/500',
},
],
},
{
component: '404',
},
],
// Theme for antd: https://ant.design/docs/react/customize-theme-cn
theme: {
'primary-color': defaultSettings.primaryColor,
},
// esbuild is father build tools
// https://umijs.org/plugins/plugin-esbuild
esbuild: {},
title: false,
ignoreMomentLocale: true,
// proxy: proxy[REACT_APP_ENV || 'dev'],
proxy: {
'/api': { // 标识需要进行转换的请求的url
"target": "http://localhost:8080/api/", // 服务端域名
"changeOrigin": true, // 允许域名进行转换
"pathRewrite": { "^/api": ''} // 将请求url里的ci去掉
},
},
manifest: {
basePath: '/',
},
// Fast Refresh 热更新
fastRefresh: {},
openAPI: [
{
requestLibPath: "import { request } from 'umi'",
// 或者使用在线的版本
// schemaPath: "https://gw.alipayobjects.com/os/antfincdn/M%24jrzTTYJN/oneapi.json"
schemaPath: join(__dirname, 'oneapi.json'),
projectName: 'ant-design-pro',
mock: false,
},
// {
// requestLibPath: "import { request } from 'umi'",
// schemaPath: 'https://gw.alipayobjects.com/os/antfincdn/CA1dOm%2631B/openapi.json',
// projectName: 'swagger',
// },
{
requestLibPath: "import { request } from 'umi'",
// schemaPath: join(__dirname, 'swagger.json'),
schemaPath: 'http://localhost:8080/v2/api-docs',
projectName: 'swagger1',
mock: false,
},
// {
// requestLibPath: "import { request } from 'umi'",
// // schemaPath: join(__dirname, 'swagger.json'),
// schemaPath: 'http://localhost:8081/api/spec',
// projectName: 'swagger2',
// mock: false,
// },
],
nodeModulesTransform: {
type: 'none',
},
// mfsu: {},
webpack5: {},
exportStatic: {},
history: { type: 'hash' },
});