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

 

相关文章:

  • 2021-12-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-14
  • 2022-01-10
猜你喜欢
  • 2021-08-04
  • 2021-05-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
  • 2021-06-29
相关资源
相似解决方案