0
点赞
收藏
分享

微信扫一扫

Failed to load resource: the server responded with a status of 404 (Not Found)

背景:

在通过 npm run build 对vue项目进行打包时,出现了该错误信息:

Failed to load resource: the server responded with a status of 404 (Not Found)_根目录

解决办法:

提示:

无法加载资源:服务器的响应状态为404(未找到),出现了该错误,那么可以打开项目根目录下的 vue.config.js文件,然后将

publicPath: '/',

改为

publicPath: './',

然后在重新 build 即可

 


举报

相关推荐

0 条评论