拓恒飞手平台网页
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.

mock.js 347B

2 years ago
1234567891011121314
  1. import { viteMockServe } from 'vite-plugin-mock'
  2. export function configMockPlugin(isBuild) {
  3. return viteMockServe({
  4. ignore: /^\_/,
  5. mockPath: 'mock',
  6. localEnabled: !isBuild,
  7. prodEnabled: isBuild,
  8. injectCode: `
  9. import { setupProdMockServer } from '../mock/_create-prod-server';
  10. setupProdMockServer();
  11. `
  12. })
  13. }