Compress HTML output into a single line
The preferred way to install this extension is through composer.
try
composer require "ogheo/yii2-htmlcompress:*"
or add
"ogheo/yii2-htmlcompress": "*"
to the require section of your composer.json
file.
return [
// ...
'components' => [
// ...
'view' => [
'class' => '\ogheo\htmlcompress\View',
'compress' => YII_ENV_DEV ? false : true,
// ...
]
]
];
By default extension is disabled on DEV environment and enabled on PROD.
Enjoy ;)