vue3配置路由报错Catch all routes (“*“) must now be defined using a param with a custom regexp.

 vue3项目在配置路由时指定未识别的路径自动跳转404页面时,报错Catch all routes ("*") must now be defined using a param with a custom regexp.
意思是捕获所有路由(“”)现在必须使用带有自定义正则表达式的参数来定义

解决方案

改为以下配置方式:

猜你喜欢

转载自blog.csdn.net/qq_51402804/article/details/129424997