2022-12-07 10:20:39 +08:00
|
|
|
import { defineBuildConfig } from '@fesjs/fes';
|
2022-04-02 19:29:38 +08:00
|
|
|
|
2022-11-10 17:48:34 +08:00
|
|
|
export default defineBuildConfig({
|
2023-04-24 14:28:22 +08:00
|
|
|
builder: 'webpack',
|
2022-05-06 17:15:26 +08:00
|
|
|
define: {
|
2022-12-07 10:20:39 +08:00
|
|
|
__DEV__: false,
|
2022-05-06 17:15:26 +08:00
|
|
|
},
|
|
|
|
title: '海贼王',
|
|
|
|
router: {
|
2022-12-07 10:20:39 +08:00
|
|
|
mode: 'hash',
|
2022-05-06 17:15:26 +08:00
|
|
|
},
|
|
|
|
access: {
|
|
|
|
roles: {
|
|
|
|
admin: ['*'],
|
2022-12-07 10:20:39 +08:00
|
|
|
menuTest: ['/', '/menuTest'],
|
|
|
|
},
|
2022-04-03 19:26:49 +08:00
|
|
|
},
|
2022-05-06 17:15:26 +08:00
|
|
|
mock: {
|
2022-12-07 10:20:39 +08:00
|
|
|
prefix: '/v2',
|
2022-05-06 17:15:26 +08:00
|
|
|
},
|
|
|
|
proxy: {
|
|
|
|
'/v2': {
|
|
|
|
target: 'https://api.douban.com/',
|
2022-12-07 10:20:39 +08:00
|
|
|
changeOrigin: true,
|
|
|
|
},
|
2022-05-06 17:15:26 +08:00
|
|
|
},
|
|
|
|
layout: {
|
|
|
|
title: 'Fes.js',
|
|
|
|
footer: 'Created by MumbleFE',
|
|
|
|
multiTabs: false,
|
|
|
|
navigation: 'side',
|
|
|
|
theme: 'dark',
|
|
|
|
menus: [
|
|
|
|
{
|
|
|
|
name: 'index',
|
|
|
|
icon: '/wine-outline.svg',
|
2022-12-07 10:20:39 +08:00
|
|
|
match: ['/route/*'],
|
2022-05-06 17:15:26 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'editor',
|
2022-12-07 10:20:39 +08:00
|
|
|
icon: '/wine-outline.svg',
|
2022-05-06 17:15:26 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '$externalLink',
|
|
|
|
icon: 'UserOutlined',
|
2022-12-07 10:20:39 +08:00
|
|
|
path: 'https://www.baidu.com',
|
2022-05-06 17:15:26 +08:00
|
|
|
},
|
|
|
|
{
|
2022-12-07 10:20:39 +08:00
|
|
|
name: 'mock',
|
2022-05-06 17:15:26 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '菜单权限测试',
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
title: '子菜单',
|
2022-12-07 10:20:39 +08:00
|
|
|
path: '/menuTest',
|
2022-05-06 17:15:26 +08:00
|
|
|
},
|
2022-12-07 10:20:39 +08:00
|
|
|
],
|
2022-05-06 17:15:26 +08:00
|
|
|
},
|
|
|
|
{
|
2022-12-07 10:20:39 +08:00
|
|
|
name: 'cssModule',
|
2022-05-06 17:15:26 +08:00
|
|
|
},
|
|
|
|
{
|
2022-12-07 10:20:39 +08:00
|
|
|
name: 'pinia',
|
|
|
|
},
|
|
|
|
],
|
2022-05-06 17:15:26 +08:00
|
|
|
},
|
|
|
|
enums: {
|
|
|
|
status: [
|
|
|
|
['0', '无效的'],
|
2022-12-07 10:20:39 +08:00
|
|
|
['1', '有效的'],
|
|
|
|
],
|
2022-05-06 17:15:26 +08:00
|
|
|
},
|
|
|
|
dynamicImport: true,
|
|
|
|
monacoEditor: {
|
2022-12-07 10:20:39 +08:00
|
|
|
languages: ['javascript', 'typescript', 'html', 'json'],
|
2022-11-10 17:48:34 +08:00
|
|
|
},
|
|
|
|
});
|