diff --git a/src/mockProdServer.ts b/src/mockProdServer.ts index a9900a0..c5f0fc8 100644 --- a/src/mockProdServer.ts +++ b/src/mockProdServer.ts @@ -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() {