合同小程序后台管理系统前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
467 B

3 months ago
  1. /**
  2. * Mock plugin for development and production.
  3. * https://github.com/anncwb/vite-plugin-mock
  4. */
  5. import { viteMockServe } from 'vite-plugin-mock';
  6. export function configMockPlugin(isBuild: boolean) {
  7. return viteMockServe({
  8. ignore: /^\_/,
  9. mockPath: 'mock',
  10. localEnabled: !isBuild,
  11. prodEnabled: isBuild,
  12. injectCode: `
  13. import { setupProdMockServer } from '../mock/_createProductionServer';
  14. setupProdMockServer();
  15. `,
  16. });
  17. }