vue 中 /config/index.js,  assetsPublicPath 的作用是便于访问打包后的静态资源,默认是相对于根 /,

当然如果直接把dist文件夹当成根来配置域名 可以什么都不用做。

这种情况主要用于 访问的地址不是根, 类似这种 http://local.wk.com/pro/frontend-vue/nssp/trunk/channel/dist/index.html,

这时想要访问dist下的资源就需要改 assetsPublicPath : / 为 assetsPublicPath: '/pro/frontend-vue/nssp/trunk/channel/dist/',

相关文章:

  • 2022-01-23
  • 2022-12-23
  • 2021-10-23
  • 2021-09-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-13
  • 2022-12-23
  • 2022-12-23
  • 2021-09-13
  • 2022-12-23
相关资源
相似解决方案