1、打包 :npm run build

2、发布:

1)使用静态服务器工具包

npm install -g serve

serve dist

访问:http://www.localhost.5000

2)使用动态web服务器(Tomcat)【了解!】

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

    output:{

      buildPath: '/vue_demo/'  ----->发布时项目的名称

    }

    2.重新打包:npm run build

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

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

     访问:http://www.localhost:8080/xxx

 

相关文章:

  • 2017-12-01
  • 2021-10-09
  • 2021-10-07
  • 2021-08-20
  • 2019-08-24
  • 2020-03-23
  • 2018-05-12
  • 2019-11-01
猜你喜欢
  • 2021-11-03
  • 2021-12-22
  • 2021-11-08
  • 2021-08-05
  • 2018-09-18
  • 2021-09-08
  • 2019-06-19
  • 2021-11-13
相关资源
相似解决方案