vue打包发布项目

2018-07-07  本文已影响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

上一篇 下一篇

猜你喜欢

热点阅读