mirror of
https://gitee.com/WeBank/fes.js.git
synced 2024-12-04 20:57:54 +08:00
8332b1114c
* feat: 添加 login 插件 * docs: 优化 access docs 文档 * refactor: beforeRender迁移到router创建后 * fix: 修复清除webpack-cache问题 * refactor: 优化 plugin 插件 Co-authored-by: wanchun <445436867@qq.com>
79 lines
1.7 KiB
JavaScript
79 lines
1.7 KiB
JavaScript
import { defineBuildConfig } from '@fesjs/fes';
|
|
|
|
export default defineBuildConfig({
|
|
builder: 'vite',
|
|
define: {
|
|
__DEV__: false,
|
|
},
|
|
title: '海贼王',
|
|
router: {
|
|
mode: 'hash',
|
|
},
|
|
access: {
|
|
roles: {
|
|
admin: ['*'],
|
|
menuTest: ['/', '/menuTest'],
|
|
},
|
|
},
|
|
mock: {
|
|
prefix: '/v2',
|
|
},
|
|
proxy: {
|
|
'/v2': {
|
|
target: 'https://api.douban.com/',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
layout: {
|
|
title: 'Fes.js',
|
|
footer: 'Created by MumbleFE',
|
|
multiTabs: false,
|
|
navigation: 'side',
|
|
theme: 'dark',
|
|
menus: [
|
|
{
|
|
name: 'index',
|
|
icon: '/wine-outline.svg',
|
|
match: ['/route/*'],
|
|
},
|
|
{
|
|
name: 'editor',
|
|
icon: '/wine-outline.svg',
|
|
},
|
|
{
|
|
title: '$externalLink',
|
|
icon: 'UserOutlined',
|
|
path: 'https://www.baidu.com',
|
|
},
|
|
{
|
|
name: 'mock',
|
|
},
|
|
{
|
|
title: '菜单权限测试',
|
|
children: [
|
|
{
|
|
title: '子菜单',
|
|
path: '/menuTest',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: 'cssModule',
|
|
},
|
|
{
|
|
name: 'pinia',
|
|
},
|
|
],
|
|
},
|
|
enums: {
|
|
status: [
|
|
['0', '无效的'],
|
|
['1', '有效的'],
|
|
],
|
|
},
|
|
dynamicImport: true,
|
|
monacoEditor: {
|
|
languages: ['javascript', 'typescript', 'html', 'json'],
|
|
},
|
|
});
|