wireguard-dashboard/web/build/plugin/mock.js
coward 12e551b4e9
Some checks failed
continuous-integration/drone/tag Build is failing
🎨添加静态打包
2024-08-21 09:10:01 +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();
`,
})
}