From abe4455d401d395145609ccdc87e0641f1a6698f Mon Sep 17 00:00:00 2001 From: Anastasia Date: Thu, 2 Aug 2018 14:41:23 +0300 Subject: [PATCH] html compress --- frontend/config/main.php | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/frontend/config/main.php b/frontend/config/main.php index 2271211..04baf36 100755 --- a/frontend/config/main.php +++ b/frontend/config/main.php @@ -353,13 +353,21 @@ //Enable compression html 'noIncludeJsFilesOnPjax' => true, //Do not connect the js files when all pjax requests - 'htmlCompressOptions' => //options for compressing output result - [ - 'extra' => false, - //use more compact algorithm - 'no-comments' => true - //cut all the html comments - ], + 'htmlFormatter' => [ + //Enable compression html + 'class' => 'skeeks\yii2\assetsAuto\formatters\html\TylerHtmlCompressor', + 'extra' => false, //use more compact algorithm + 'noComments' => true, //cut all the html comments + 'maxNumberRows' => 50000, //The maximum number of rows that the formatter runs on + + //or + + // 'class' => 'skeeks\yii2\assetsAuto\formatters\html\MrclayHtmlCompressor', + + //or any other your handler implements skeeks\yii2\assetsAuto\IFormatter interface + + //or false + ], ], ], -- libgit2 0.21.4