defyma / yii2-compress-asset
This solution enables you to dynamically combine js and css files to optimize the html page.
Installs: 193
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
Type:yii2-extension
Requires
This package is auto-updated.
Last update: 2025-03-05 01:37:37 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 defyma/yii2-compress-asset "*"
or add
"defyma/yii2-compress-asset": "*"
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' => ['assetsAutoCompress'], 'components' => [ //.... 'assetsAutoCompress' => [ 'class' => '\defyma\assets\AssetsCompressComponent', 'enabled' => true, 'jsCompress' => true, 'cssFileCompile' => true, 'jsFileCompile' => true, ], //.... ] ]