打包 npm run build
打包文件的时候会 不添加productionSourceMap: false, 会使得文件更大,会有map文件
map就可以像未加密的代码一样,准确是哪一行哪一列有错。
所有该文件如果项目不需要是可以去除掉
vue.config.js配置
productionSourceMap: false,
打包后
看(11条消息) Linux安装Nginx步骤_闪耀太阳的博客-CSDN博客_linux nginx 安装
直到修改nginx’配置文件
location / { root /opt/shangpinghui/dist; 前端//地址 index index.html index.htm; try_files $uri $url/ /index.html; } location /api { proxy_pass http://39.98.123.211;//后端地址 }
/usr/local/nginx/sbin 在这个地址下用命令
[root@localhost sbin]# ps aux | grep nginx
看进程有多少
只保留一个 多余的话
kill -9 21321 杀死多少号的进程
sudo /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
./nginx -s reload 这个命令重新启动
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)