mirror of
https://gitee.com/fantastic-admin/basic.git
synced 2024-12-06 05:57:58 +08:00
修复mock文件引入后缀错误
This commit is contained in:
parent
03a10f569c
commit
3a196d6809
@ -1,9 +1,9 @@
|
||||
import { createProdMockServer } from 'vite-plugin-mock/es/createProdMockServer'
|
||||
|
||||
const mocks: any[] = []
|
||||
const mockContext: any = import.meta.glob('./mock/*.js', { eager: true })
|
||||
const mockContext = import.meta.glob('./mock/*.ts', { eager: true })
|
||||
Object.keys(mockContext).forEach((v) => {
|
||||
mocks.push(...mockContext[v].default)
|
||||
mocks.push(...(mockContext[v] as any).default)
|
||||
})
|
||||
|
||||
export function setupProdMockServer() {
|
||||
|
Loading…
Reference in New Issue
Block a user