安装node后,下载
- npm install -g browser-sync
简单使用
browser-sync start --server --files "**/*.html, **/*.css"
browser-sync start --server --files "**"
代理
browser-sync start --proxy "localhost:8080" --files "css/*.css"
- 默认的端口是3000 如果被占用会开启新的端口3001,依次递增。