听海 43496ef307
feat(plugin-layout): custom插槽支持 menus 参数 & 重构403、404逻辑 (#181)
* feat(plugin-layout): custom插槽添加menus参数

* refactor: 403/404默认显示layout,在pages目录下创建404.vue/403.vue可覆盖默认

* refactor(plugin-layout): 优化index.jsx

n

* fix: 403/404添加title
2023-04-06 10:07:29 +08:00

94 lines
2.0 KiB
JavaScript

import { defineBuildConfig } from '@fesjs/fes';
export default defineBuildConfig({
swc: false,
targets: {
chrome: '78',
},
define: {
__DEV__: false,
},
html: {
title: '海贼王',
},
router: {
mode: 'hash',
},
watermark: {
disabled: false,
},
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: true,
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',
},
],
menuProps: {
defaultExpandAll: false,
},
},
devServer: {
port: 8080,
},
enums: {
status: [
['0', '无效的'],
['1', '有效的'],
],
},
dynamicImport: true,
monacoEditor: {
languages: ['javascript', 'typescript', 'html', 'json'],
},
presets: [require.resolve('../fes-builder-webpack/lib')],
});