vue自定义打包路径需要修改三处:

1.在代码根目录下的index.html中增加 <meta base="/VmallAdmin/"> 如图所示。
vue自定义打包路径--springboot前后端分离
2.在src目录下的router目录下,在index.js中,增加:
base: ‘/VmallAdmin/’, 如下图所示:

vue自定义打包路径--springboot前后端分离

3.在项目路径下的config目录下,修改index.js。在build下将原来的assetsPublicPath:’/’
修改为assetsPublicPath:’/VmallAdmin/’
vue自定义打包路径--springboot前后端分离
到这里,自定义路径就完成了。之后将打包后的dist下的目录放在springboot项目的/resource/static/自定义目录/ 下即可。如下图:
vue自定义打包路径--springboot前后端分离

相关文章:

  • 2021-11-09
  • 2021-04-19
  • 2022-01-08
  • 2021-05-31
  • 2022-12-23
  • 2021-09-06
  • 2022-12-23
  • 2021-10-24
猜你喜欢
  • 2022-12-23
  • 2022-01-07
  • 2021-09-03
  • 2021-09-30
  • 2022-12-23
  • 2021-12-27
相关资源
相似解决方案