用vue-cli搭建的作法一、npm run build二、把dist里的文件打包上传至服务器 例 /data/www/,我通常把index.html放在static里因此个人文件路径为:/data/www/static |-----index.html |-----js |-----css |-----images ....三、配置nginx监听80端口, location /static alias 到 /data/www/static,重启nginx location /static { alias /data/www/static/; }四、浏览器访问http://ip/static/index.html便可css
做者:Yang Ezreal
连接:https://www.zhihu.com/question/46630687/answer/102284339
来源:知乎
著做权归做者全部。商业转载请联系做者得到受权,非商业转载请注明出处。html