1
0
mirror of https://github.com/WeBankFinTech/fes.js.git synced 2025-04-06 03:59:53 +08:00

Merge pull request from xuan-T/mock

fix: 变更mock插件目录
This commit is contained in:
harrywan 2021-02-05 17:06:28 +08:00 committed by GitHub
commit 2932f9fd8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 6 deletions
packages/fes-preset-built-in/src
index.js
plugins/features

@ -47,6 +47,7 @@ export default function () {
require.resolve('./plugins/features/terserOptions'),
require.resolve('./plugins/features/vueLoader'),
require.resolve('./plugins/features/hardSource'),
require.resolve('./plugins/features/mock'),
// misc
require.resolve('./plugins/misc/route'),
@ -56,10 +57,7 @@ export default function () {
require.resolve('./plugins/commands/dev'),
require.resolve('./plugins/commands/help'),
require.resolve('./plugins/commands/info'),
require.resolve('./plugins/commands/webpack'),
// mock
require.resolve('./plugins/commands/mock')
require.resolve('./plugins/commands/webpack')
]
};
}

@ -65,8 +65,7 @@ export default (api) => {
// 把基于 cgiMockfile 的相对绝对转成绝对路径
function parsePath(value) {
const PROJECT_DIR = process.env.PWD || api.cwd;
return resolve(PROJECT_DIR, value);
return resolve(api.cwd, value);
}
const createMock = () => {