美文网首页
vue打包发布项目

vue打包发布项目

作者: 陈老板_ | 来源:发表于2018-07-07 13:30 被阅读40次

打包:
npm run build
发布 1: 使用静态服务器工具包
npm install -g serve
serve dist
访问: http://localhost:5000
发布 2: 使用动态 web 服务器(tomcat)
修改配置: webpack.prod.conf.js
output: {
publicPath: '/xxx/' //打包文件夹的名称
}
重新打包:
npm run build
修改 dist 文件夹为项目名称: xxx
将 xxx 拷贝到运行的 tomcat 的 webapps 目录下
访问: http://localhost:8080/xxx

相关文章

网友评论

      本文标题:vue打包发布项目

      本文链接:https://www.haomeiwen.com/subject/fwlwuftx.html