webpack nginx gzip压缩


webpackConfig.plugins.push( new CompressionWebpackPlugin({ filename: '[path].gz[query]', algorithm: 'gzip', test: new RegExp( '\\.(' + config.build.productionGzipExtensions.join('|') + ')$' ), threshold: 10240, minRatio: 0.8 }) )

  

server {
	gzip on;
    	gzip_static on;
	listen 3335;
	listen [::]:3335;

	index index.html index.htm index.nginx-debian.html;

	server_name _;
	location / {
            	    
				 root /data/thrc_zhf/yichandisystem/lincaoju_new/dist;
				 index index.html;
		
                  }
}

  

posted on 2020-06-28 16:05  苹果园dog  阅读(214)  评论(0编辑  收藏  举报

导航