Skip to content

Commit

Permalink
feat: test
Browse files Browse the repository at this point in the history
  • Loading branch information
cloud-mouse committed Sep 19, 2024
1 parent d0eda2b commit a9deed7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions vite/plugins/mockProdServer.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { createProdMockServer } from 'vite-plugin-mock/client'
import user from '../../src/mock/user'
import sys_user from '../../src/mock/sys_user'
// 逐一导入您的mock.ts文件
// 如果使用vite.mock.config.ts,只需直接导入文件
// 可以使用 import.meta.glob功能来进行全部导入

export function setupProdMockServer() {
createProdMockServer([...user, ...sys_user])
}

0 comments on commit a9deed7

Please sign in to comment.