wireguard-dashboard-admin/mock/index.js

12 lines
326 B
JavaScript
Raw Normal View History

2022-01-08 17:20:46 +08:00
import { createProdMockServer } from 'vite-plugin-mock/es/createProdMockServer'
2022-06-26 18:42:07 +08:00
const modules = import.meta.globEager('./modules/*.js')
2022-01-08 17:20:46 +08:00
const mockModules = []
Object.keys(modules).forEach((key) => {
mockModules.push(...modules[key].default)
})
export function setupProdMockServer() {
createProdMockServer(mockModules)
}