refactor(mock): ♻️ 抽离公共代码

This commit is contained in:
cshaptx4869 committed 2024-03-02 16:45:27 +08:00
1 parent f65e38b9bd
commit b30cfe0e67
7 files changed
+32 -52

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
import path from "path";
import { createDefineMock } from "vite-plugin-mock-dev-server";
export const defineMock = createDefineMock((mock) => {
// 拼接url
mock.url = path.join(
import.meta.env.VITE_APP_BASE_API + "/api/v1/",
mock.url
);
});