vue-vben-admin/mock/_createProductionServer.ts

12 lines
392 B
TypeScript
Raw Normal View History

2020-09-28 20:19:10 +08:00
import { createProdMockServer } from 'vite-plugin-mock/es/createProdMockServer';
import userMock from './sys/user';
import menuMock from './sys/menu';
2020-10-08 01:35:05 +08:00
import tableDemoMock from './demo/table-demo';
2020-09-28 20:19:10 +08:00
2020-10-29 23:01:11 +08:00
/**
* Used in a production environment. Need to manually import all modules
*/
2020-09-28 20:19:10 +08:00
export function setupProdMockServer() {
2020-10-08 01:35:05 +08:00
createProdMockServer([...userMock, ...menuMock, ...tableDemoMock]);
2020-09-28 20:19:10 +08:00
}