30 lines
774 B
TypeScript
30 lines
774 B
TypeScript
import { defineConfig } from '@umijs/max';
|
|
import path from 'path';
|
|
|
|
export default defineConfig({
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://api.erp.xunhong168.test/',
|
|
changeOrigin: true,
|
|
pathRewrite: { '^/': '' },
|
|
},
|
|
},
|
|
plugins: ['@umijs/max-plugin-openapi'],
|
|
openAPI: [
|
|
{
|
|
requestLibPath: "import request from '../request';",
|
|
// schemaPath: 'http://localhost:8082/v3/api-docs',
|
|
schemaPath: path.resolve(__dirname, '../../swagger/auth.json'),
|
|
projectName: 'auth',
|
|
namespace: 'AuthAPI',
|
|
},
|
|
{
|
|
requestLibPath: "import request from '../request';",
|
|
// schemaPath: 'http://localhost:8083/v3/api-docs',
|
|
schemaPath: path.resolve(__dirname, '../../swagger/business.json'),
|
|
projectName: 'business',
|
|
namespace: 'BusinessAPI',
|
|
},
|
|
],
|
|
});
|