/*
 * @Author: donghao donghao@supervision.ltd
 * @Date: 2025-03-06 14:07:14
 * @LastEditors: donghao donghao@supervision.ltd
 * @LastEditTime: 2025-03-06 14:07:20
 * @FilePath: \vite-ai\data-dashboard\src\mock\index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { createMockServer } from 'vite-plugin-mock/client'

export function mockServer() {
  createMockServer({
    // 配置自动导入mock目录下所有文件
    include: ['src/mock/**/*.ts'],
    // 生产环境强制关闭mock（即使忘记修改配置）
    ignore: import.meta.env.PROD ? [/.*/] : undefined 
  })
}