VUE 笔记 ilovecoding 228 nginx-项目在window下部署

  1. 执行命令 npm run build
  2. 安装nginx https://nginx.org/
  • mainline 开发版本
  • stable 最新稳定版本
  • legacy 老版本的稳定版
    解压路径不要有中文,用打包好的 dist 目录内容替换掉 html 目录的内容
  1. 也可以不放在 html 目录,自己定义,修改 conf/nginx.conf 的 location,改完后重启 nginx -s reload

posted @ 2023-03-26 17:54  君子键  阅读(18)  评论(0)    收藏  举报