使用 Vite 的开发服务器,如果我尝试访问不存在的 URL(例如localhost:3000/nonexistent/index.html),我会收到404错误。相反,我收到一个200状态代码以及localhost:3000/index.html.
在这种情况下,如何配置 Vite 使其返回 a 404?
(这个问题:Serve a 404 page with app created with Vue-CLI非常相似,但与基于 Webpack 的 Vue-CLI 而不是 Vite 相关。)