本地服务器运行正常,但是项目页面打开后显示Cannot GET /

在这里插入图片描述或者
the server responded with a status of 404 (Not Found)

解决办法:

config/index.js里面

 dev: {
         assetsPublicPath: './',
 }

变成:

 dev: {
         assetsPublicPath: '/',
 }

就🆗了

Logo

基于 Vue 的企业级 UI 组件库和中后台系统解决方案,为数万开发者服务。

更多推荐