Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用带?的 url 报错 #126

Open
wlpswll opened this issue Jan 11, 2024 · 0 comments
Open

使用带?的 url 报错 #126

wlpswll opened this issue Jan 11, 2024 · 0 comments

Comments

@wlpswll
Copy link

wlpswll commented Jan 11, 2024

如下 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant