Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
chore: mock使用提示
Browse files Browse the repository at this point in the history
  • Loading branch information
jinmao88 committed Feb 11, 2024
1 parent 5ae345b commit 2bbf4aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions configs/vite/src/plugins/mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { vitePluginFakeServer } from 'vite-plugin-fake-server'
// 使用新的依赖库 vite-plugin-fake-server
// 注意事项:
// 1. mock文件夹下,所有的 *.mock.ts 文件,都会被加载
// 2. *.mock.ts 文件中 不能存在export default意外的export,抽离到别的ts即可,列如util
// 3. *.mock.ts 文件中 只能import相对路径,即不可引入 '@vben/util/mock-util'
// 2. *.mock.ts 文件中 不能存在export default以外的export,抽离到别的ts即可,列如util
// 3. *.mock.ts 文件中 只能import相对路径,不可引入 '@vben/util/mock-util'

export function configMockPlugin(isBuild: boolean) {
return vitePluginFakeServer({
Expand Down

0 comments on commit 2bbf4aa

Please sign in to comment.