iisns / yii2-assets-compress
This solution enables you to dynamically combine js and css files to optimize the html page.
Installs: 1 523
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 2
Forks: 1
Open Issues: 0
Type:yii2-extension
Requires
This package is not auto-updated.
Last update: 2025-03-05 05:12:25 UTC
README
This solution enables you to dynamically combine js and css files to optimize the html page.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist iisns/yii2-assets-compress "*"
or add
"iisns/yii2-assets-compress": "*"
to the require section of your composer.json
file.
Usage
Once the extension is installed, simply use it in your code by :
//App config [ 'bootstrap' => ['assetsCompress'], 'components' => [ //.... 'assetsAutoCompress' => [ 'class' => '\iisns\assets\AssetsCompressComponent', 'enabled' => true, 'jsCompress' => true, 'cssFileCompile' => true, 'jsFileCompile' => true, ], //.... ] ]