mirror of
https://gitee.com/fantastic-admin/basic.git
synced 2024-12-05 05:27:39 +08:00
12 lines
312 B
TypeScript
Executable File
12 lines
312 B
TypeScript
Executable File
import { vitePluginFakeServer } from 'vite-plugin-fake-server'
|
|
|
|
export default function createMock(env, isBuild) {
|
|
const { VITE_BUILD_MOCK } = env
|
|
return vitePluginFakeServer({
|
|
logger: !isBuild,
|
|
include: 'src/mock',
|
|
infixName: false,
|
|
enableProd: isBuild && VITE_BUILD_MOCK === 'true',
|
|
})
|
|
}
|