micro-app/config/config.ts
2024-07-09 17:16:13 +08:00

59 lines
1.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { defineConfig } from '@umijs/max';
import pxtorem from 'postcss-pxtorem';
const rootFontSize = 80 // 设计稿尺寸32px = 1rem; @default 80
export default defineConfig({
favicons: ['/assets/logo.jpg'],
access: {},
model: {},
dva: {},
request: {},
initialState: {},
layout: false,
qiankun: {
master: {
prefetch: false,
},
},
mfsu: false,
npmClient: 'pnpm',
alias: {
'@src': '/src',
'@components': '/src/components',
'@constants': '/src/constants',
'@common': '/src/common',
'@utils': '/src/utils',
'@public': '/public',
},
define: {
// ROUTES: routes,
// PLATFORM_TITLE: pkg.description,
ROOT_FONT_SIZE: rootFontSize,
APP_LIST: [
{
name: 'video', // 视频分析
entry: '//localhost:30088/',
},
{
name: 'cabinet', // 盒子管理
entry: '//localhost:30068/',
},
{
name: 'material', // 物料仓
entry: '//localhost:30098/',
},
{
name: 'algorithm', // 算法分析
entry: '//localhost:30078/',
},
]
},
extraPostCSSPlugins: [
pxtorem({
rootValue: rootFontSize,//结果为:设计稿元素尺寸/16比如元素宽320px,最终页面会换算成 20rem
propList: ['*'],
}),
]
});