Vue项目打包发布到tomcat

 

npm run build

 

Nodejs服务器安装:

 

npm install -g serve

 

1、本地测试运行打包的vue:

serve dist    

 

 

访问:http:localhost:5000

Vue项目打包发布到tomcat

  1. 打包部署到tomcat服务器

 

   修改配置:webpack.prod.conf.js

 

     output:{

        publicPath:’XXX’    //打包文件夹名称

}

 

   重新打包:

      npm run build

 

修改 dist 文件夹为项目名称:xxx

 

将xxx拷贝到运行的tomcat的 webapps 目录下

 

 

启动tomcat:

 

访问:http://localhost:8080

 

Vue项目打包发布到tomcat

相关文章:

  • 2021-11-23
  • 2021-06-29
  • 2021-05-19
  • 2021-11-23
  • 2021-11-28
  • 2021-09-03
猜你喜欢
  • 2021-11-28
  • 2021-10-02
  • 2021-12-14
  • 2021-09-07
  • 2021-08-17
  • 2021-10-31
相关资源
相似解决方案