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

阅读 88

2022-05-30

背景:

在通过 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)

0 0 举报