默认情况下vue项目打包后,本地打开index.html是空白的,有报错。Failed to load resource: net::ERR_FILE_NOT_FOUND

这时需要修改config->index.js

vue项目打包成html,在本地点击直接能打开

 

这时再打包,页面能看到了,但是好多引用的文件路径不对。

然后再修改build->utils.js ,加上publicPath:’../../’

vue项目打包成html,在本地点击直接能打开

 

 

再打包,就好了

相关文章:

  • 2021-09-20
  • 2021-04-12
  • 2022-12-23
  • 2021-12-21
  • 2022-12-23
  • 2021-08-10
  • 2021-09-07
  • 2022-01-07
猜你喜欢
  • 2022-12-23
  • 2021-12-04
  • 2022-12-23
  • 2021-11-30
  • 2021-08-17
  • 2021-06-05
  • 2021-07-17
相关资源
相似解决方案