Open Eastboat opened 1 year ago
error when starting dev server: TypeError: (0 , import_vite_plugin_mock.default) is not a function
// vite.config.js // MockJS 插件 import viteMockServe from 'vite-plugin-mock'; //...... export default defineConfig({ plugins: [ vue(), viteMockServe({ mockPath: './src/mock', // mock文件所在文件夹 localEnabled: true, // 是否应用于本地 prodEnabled: false, // 是否应用于生产 watchFiles: true, // 监听mock文件变化 logger: true, }) // ....... })
error when starting dev server: TypeError: (0 , import_vite_plugin_mock.default) is not a function