You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- 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)
- }
|