39 lines
794 B
TypeScript
39 lines
794 B
TypeScript
import { defineConfig } from 'umi';
|
|
import routes from './routes'
|
|
export default defineConfig({
|
|
nodeModulesTransform: {
|
|
type: 'none', // all 慢 兼容好
|
|
},
|
|
routes,
|
|
fastRefresh: {},
|
|
history: {
|
|
type: 'browser'
|
|
},
|
|
// 后续设置的配置
|
|
devServer: {
|
|
port: 3000, // 启动端口
|
|
},
|
|
title: 'UmiV3',// 网站标题
|
|
favicon: '/favicon.ico',// 网站图标
|
|
dynamicImport: {}, // 按需加载
|
|
mountElementId: 'root', // 指定 reactapp 渲染到元素的根元素 id
|
|
|
|
proxy: {
|
|
'/api': {
|
|
target: 'https://127.0.0.1:8989'
|
|
},
|
|
},
|
|
|
|
// 主题
|
|
theme: {
|
|
// '@primary-color': 'red',
|
|
},
|
|
// https://v3.umijs.org/zh-CN/plugins/plugin-layout
|
|
layout: {
|
|
name: 'Umi.js',
|
|
locale: true,
|
|
layout: 'side',
|
|
logo: '/user.jpg',
|
|
},
|
|
});
|