1、安装 npm i -g live-server 2、使用 在项目目录下输入live-server 即可,即可在浏览器输入http://127.0.0.1:8080/ 看到页面效果且可以实现实时更新 live-server 效果