From 1bfb4b1c1a3ec1b88fcd8f25a2b0697b701c4dc5 Mon Sep 17 00:00:00 2001
From: wanchun <445436867@qq.com>
Date: Wed, 5 Jan 2022 11:12:09 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E5=BD=93build-in=E7=89=88=E6=9C=AC?=
=?UTF-8?q?=E5=8F=98=E5=8C=96=E6=97=B6,=E7=BC=93=E5=AD=98=E5=A4=B1?=
=?UTF-8?q?=E6=95=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../plugins/commands/webpackConfig/index.js | 1 +
packages/fes-template/.fes.js | 15 +++---
packages/fes-template/src/locales/en-US.js | 3 +-
packages/fes-template/src/locales/zh-CN.js | 3 +-
packages/fes-template/src/pages/mock.vue | 49 +++++++++++++++++++
5 files changed, 63 insertions(+), 8 deletions(-)
create mode 100644 packages/fes-template/src/pages/mock.vue
diff --git a/packages/fes-preset-built-in/src/plugins/commands/webpackConfig/index.js b/packages/fes-preset-built-in/src/plugins/commands/webpackConfig/index.js
index 0ad8ea00..6ee2a43e 100644
--- a/packages/fes-preset-built-in/src/plugins/commands/webpackConfig/index.js
+++ b/packages/fes-preset-built-in/src/plugins/commands/webpackConfig/index.js
@@ -82,6 +82,7 @@ export default async function getConfig({
// --------------- cache -----------
webpackConfig.cache({
type: 'filesystem',
+ version: require('../../../../package.json').version,
cacheDirectory: join(cwd, '.cache/webpack')
});
diff --git a/packages/fes-template/.fes.js b/packages/fes-template/.fes.js
index 585a5af4..5f4f505b 100644
--- a/packages/fes-template/.fes.js
+++ b/packages/fes-template/.fes.js
@@ -1,7 +1,7 @@
// .fes.js 只负责管理编译时配置,只能使用plain Object
export default {
- // exportStatic: {},
+ // exportStatic: {},
define: {
__DEV__: false
},
@@ -15,7 +15,7 @@ export default {
access: {
roles: {
admin: ['*'],
- menuTest: ['/','/menuTest']
+ menuTest: ['/', '/menuTest']
}
},
request: {
@@ -54,18 +54,21 @@ export default {
path: 'https://www.baidu.com'
},
{
- title: '菜单权限测试',
+ name: 'mock'
+ },
+ {
+ title: '菜单权限测试',
children: [
{
title: '子菜单',
- path: '/menuTest',
+ path: '/menuTest'
},
{
title: '子菜单a',
path: '/menuTest/a'
- },
+ }
]
- },
+ },
{
name: 'cssModule'
}
diff --git a/packages/fes-template/src/locales/en-US.js b/packages/fes-template/src/locales/en-US.js
index 0d39017e..e3efe619 100644
--- a/packages/fes-template/src/locales/en-US.js
+++ b/packages/fes-template/src/locales/en-US.js
@@ -3,5 +3,6 @@ export default {
home: 'home',
store: 'store',
editor: 'editor',
- externalLink: 'externalLink'
+ externalLink: 'externalLink',
+ mock: 'mock'
};
diff --git a/packages/fes-template/src/locales/zh-CN.js b/packages/fes-template/src/locales/zh-CN.js
index be54ef9f..55fc4666 100644
--- a/packages/fes-template/src/locales/zh-CN.js
+++ b/packages/fes-template/src/locales/zh-CN.js
@@ -3,5 +3,6 @@ export default {
home: '首页',
store: '状态管理',
editor: '编辑器',
- externalLink: '外部链接'
+ externalLink: '外部链接',
+ mock: '代理'
};
diff --git a/packages/fes-template/src/pages/mock.vue b/packages/fes-template/src/pages/mock.vue
new file mode 100644
index 00000000..0e48ff61
--- /dev/null
+++ b/packages/fes-template/src/pages/mock.vue
@@ -0,0 +1,49 @@
+
+
+ mock and proxy
+
+
+
+{
+ "name": "mock",
+ "title": "$mock"
+}
+
+