refactor: 全局规范化调整文件夹和文件命名(代码无改动)

This commit is contained in:
张传龙
2022-04-01 17:41:07 +08:00
parent 8648f16ed8
commit 5993e8d7d0
10 changed files with 6 additions and 6 deletions

View File

@@ -0,0 +1,14 @@
import { createProdMockServer } from 'vite-plugin-mock/es/createProdMockServer'
const modules = import.meta.globEager('./**/*.js')
const mockModules = []
Object.keys(modules).forEach((key) => {
if (key.includes('/_')) {
return
}
mockModules.push(...modules[key].default)
})
export function setupProdMockServer() {
createProdMockServer(mockModules)
}