Open wlpswll opened 8 months ago
如下 mock 代码,vite@5,vite-plugin-mock@3.0.0 代码: export default [ { url: '/xx/xxx/xxxx?sss=1211', method: 'post', timeout: Math.floor(Math.random() * (1200 + 1)), response: () => { return { ret: 0, msg: '', total: 1, list: [
] }; }
} ] as MockMethod[]; 报错信息: node_modules/path-to-regexp/dist/index.js:114 throw new TypeError("Unexpected ".concat(nextType, " at ").concat(index, ", expected ").concat(type)); ^
TypeError: Unexpected MODIFIER at 31, expected END
如下 mock 代码,vite@5,vite-plugin-mock@3.0.0 代码: export default [ { url: '/xx/xxx/xxxx?sss=1211', method: 'post', timeout: Math.floor(Math.random() * (1200 + 1)), response: () => { return { ret: 0, msg: '', total: 1, list: [
} ] as MockMethod[]; 报错信息: node_modules/path-to-regexp/dist/index.js:114 throw new TypeError("Unexpected ".concat(nextType, " at ").concat(index, ", expected ").concat(type)); ^
TypeError: Unexpected MODIFIER at 31, expected END