build后的文件需要部署在http服务器上,不能通过file协议打开,如果没有http服务器可先行通过node-static来启动服务:
1.node-static安装:
2.cnpm install -g node-static
3.static www (ps: build后生成的目录,如果是dist则是static dist),通过生成出来的路径访问,如:(http://127.0.0.1:8080)
image.png
build后的文件需要部署在http服务器上,不能通过file协议打开,如果没有http服务器可先行通过node-static来启动服务:
1.node-static安装:
2.cnpm install -g node-static
3.static www (ps: build后生成的目录,如果是dist则是static dist),通过生成出来的路径访问,如:(http://127.0.0.1:8080)
image.png
本文标题:24.Vue中build打包后,本机通过node-static服
本文链接:https://www.haomeiwen.com/subject/rvooeftx.html
网友评论