fix(projects): 修复mock生产环境数据问题

This commit is contained in:
‘chen.home’ 2022-08-07 22:56:42 +08:00
parent 9e7de0451d
commit 32adc98468

View File

@ -1,7 +1,9 @@
import { viteMockServe } from 'vite-plugin-mock'; import { viteMockServe } from 'vite-plugin-mock'; // https://github.com/vbenjs/vite-plugin-mock/blob/main/README.zh_CN.md
export default viteMockServe({ export default viteMockServe({
mockPath: 'mock', mockPath: 'mock',
watchFiles: true, // 监视文件更改 injectCode: `
// localEnabled: command === 'serve', import { setupMockServer } from '../mock';
setupMockServer();
`,
}); });