在项目打包发布的时候,build完成发出去根本访问不到页面报错Failed to load resource: the server responded with a status of 404 (Not Found) 通过多方查找最终定位除了问题 是路径的问题。

解决方式:找到config文件底下的index.js文件 build节点下 assetsPublicPath改为 assetsPublicPath: './' 相对路径 斜杠前面加一小点。
vue项目 build 打包后访问不到页面 Failed to load resource: the server responded with a status of 404 (Not Found)
这样重新打包就ok 了。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-17
  • 2021-04-27
  • 2022-12-23
  • 2021-06-03
  • 2022-12-23
猜你喜欢
  • 2021-03-31
  • 2022-12-23
  • 2021-12-22
相关资源
相似解决方案