eg: productionGzip: true
(1).打開nginx 配置文件 nginx.conf前端
(2). 開啓gzip壓縮功能(注意:gzip_static on; 這行命令若是沒有 須要加上 )vue
(3)執行保存命令(wq!)webpack
(4)重啓nginxnginx
一、先執行nginx測試web
(nginx 路徑) -t 根據本身安裝目錄執行 lnmp 默認路徑 : /usr/local/nginx/sbin/nginx -t
二、 執行重啓命令 :npm
(nginx 路徑) -s reload 根據本身安裝目錄執行