gf-vben-admin/mock/_createProductionServer.ts

20 lines
551 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';
2021-01-06 20:10:16 +08:00
import accountDemoMock from './demo/account';
import selectDemoMock from './demo/select-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() {
2021-01-06 20:10:16 +08:00
createProdMockServer([
...userMock,
...menuMock,
...tableDemoMock,
...accountDemoMock,
...selectDemoMock,
]);
2020-09-28 20:19:10 +08:00
}