wireguard-dashboard-admin/build/plugin/mock.js
2022-08-27 14:22:09 +08:00

14 lines
313 B
JavaScript

import { viteMockServe } from 'vite-plugin-mock'
export function configMockPlugin(isBuild) {
return viteMockServe({
mockPath: 'mock/api',
localEnabled: !isBuild,
prodEnabled: isBuild,
injectCode: `
import { setupProdMockServer } from '../mock';
setupProdMockServer();
`,
})
}