wireguard-dashboard/web/build/plugin/mock.js

14 lines
313 B
JavaScript
Raw Normal View History

2024-08-21 09:10:01 +08:00
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();
`,
})
}