vue项目打包所遇问题
一/index.html打开空白
在config下的 index.js ,
修改build中的assetsPublicPath:’/'为assetsPublicPath:"./"
如下所示内容:
vue项目打包后index.html打开空白/背景图片不显示

二/背景图片不显示
vue项目中,在css样式中引用了一张背景图片,开发环境下是可以正常显示,build之后背景图片不显示。
解决方法:
在 build/utils.js 文件
添加 publicPath:"…/…/"
如下所示内容:
vue项目打包后index.html打开空白/背景图片不显示

相关文章:

  • 2022-01-13
  • 2021-05-01
  • 2022-01-03
  • 2021-12-22
  • 2021-10-20
  • 2022-01-02
  • 2021-08-20
猜你喜欢
  • 2021-08-25
  • 2022-12-23
  • 2022-12-23
  • 2022-02-20
  • 2022-12-23
  • 2022-01-20
  • 2022-12-23
相关资源
相似解决方案