
Product
Introducing Repository Access Permissions and Custom Roles
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.
vite-plugin-hybrid-mock
Advanced tools
提供给使用 uniapp 等跨端框架和 vite 构建工具的开发者一个统一的 mock 方案
使用 vite 的 transform 钩子注入代码,强依赖 better-mock(改进版 mock)来提供 mock 服务
在 vite.config.ts 中
import vitePluginHybridMock from "vite-plugin-hybrid-mock";
import { defineConfig } from "vite";
export default defineConfig({
plugins: [vitePluginHybridMock()],
});
其中能导出 CustomMockMethod 用于定义要 Mock 的接口实例
import type { CustomMockMethod } from "vite-plugin-hybrid-mock";
按照该目录结果进行 mock 的编写
// 根目录
- `src/`:存放源代码文件的目录
- `mock/`:存放mock文件的目录
- `api/`:
- `index.ts`:导出所有 CustomMockMethod, 也就是一个CustomMockMethod[]
- `model/`:
- `index.ts`:导出接口中的所有模型实体如: userModel
FAQs
提供给使用 uniapp 等跨端框架和 vite 构建工具的开发者一个统一的 mock 方案
The npm package vite-plugin-hybrid-mock receives a total of 5 weekly downloads. As such, vite-plugin-hybrid-mock popularity was classified as not popular.
We found that vite-plugin-hybrid-mock demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.