42 lines
830 B
TypeScript
42 lines
830 B
TypeScript
import { defineConfig } from 'umi';
|
|
import { Platform, Arch } from '@umijs/plugin-electron';
|
|
|
|
export default defineConfig({
|
|
npmClient: 'yarn',
|
|
plugins: ['@umijs/plugin-electron'],
|
|
electron: {
|
|
builder: {
|
|
targets: Platform.LINUX.createTarget(['AppImage'], Arch.x64),
|
|
},
|
|
},
|
|
// 配置 Ant Design
|
|
mfsu: false,
|
|
hash: true,
|
|
styles: ['src/global.less'],
|
|
// 路由配置
|
|
routes: [
|
|
{
|
|
path: '/login',
|
|
component: '@/pages/login',
|
|
},
|
|
{
|
|
path: '/',
|
|
component: '@/pages/components/Layout/index',
|
|
routes: [
|
|
{
|
|
path: '/images',
|
|
component: '@/pages/images',
|
|
},
|
|
{
|
|
path: '/profile',
|
|
component: '@/pages/profile',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
path: '/',
|
|
redirect: '@/pages/login',
|
|
},
|
|
],
|
|
});
|