From c7cf72c2716819871ec189b37eea956a47ee2f53 Mon Sep 17 00:00:00 2001
From: ZhangXianQiang <1135831638@qq.com>
Date: 星期四, 20 六月 2024 14:10:14 +0800
Subject: [PATCH] build:添加mock

---
 vite.config.js |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/vite.config.js b/vite.config.js
index 5d19cb7..059f547 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -5,6 +5,7 @@
 import AutoImport from 'unplugin-auto-import/vite';
 import Components from 'unplugin-vue-components/vite';
 import { ElementPlusResolver } from 'unplugin-vue-components/resolvers';
+import { viteMockServe } from 'vite-plugin-mock';
 
 // https://vitejs.dev/config/
 export default defineConfig({
@@ -21,6 +22,11 @@
             resolvers: [ElementPlusResolver()],
         }),
 
+        viteMockServe({
+            mockPath: 'mock', // mock 鏁版嵁瀛樻斁鐨勭洰褰�
+            localEnabled: true, // 寮�鍙戠幆澧冨惎鐢� mock
+            prodEnabled: false, // 鐢熶骇鐜绂佺敤 mock
+        }),
     ],
     /*寮�鍙戞湇鍔″櫒閫夐」*/
     server: {

--
Gitblit v1.8.0