Svelt项目通过sirv启动本地服务,localhost:port资源文法访问
参考github问答
- sirv脚手架issue: https://github.com/lukeed/sirv/issues/70
npm script 设置 host 0.0.0.0或者127.0.0.1
json
{
"scripts": {
"build": "rollup -c",
"start": "sirv public --no-clear -s --host 0.0.0.0",
"dev": "rollup -c -w",
"dev:server": "cd demo && nodemon scripts.js"
}
}