portal.mkgtu.ru/frontend/config/assets/compress.php

40 lines
742 B
PHP
Raw Permalink Normal View History

2024-03-28 09:51:45 +03:00
<?php
Yii::setAlias('@webroot', Yii::getAlias('@frontend/web'));
Yii::setAlias('@web', '/');
return [
'jsCompressor' => 'uglifyjs {from} -o {to}',
'cssCompressor' => 'yuicompressor --type css {from} -o {to}',
'bundles' => [
'frontend\assets\FrontendAsset',
'yii\web\YiiAsset',
'yii\web\JqueryAsset',
],
'targets' => [
'all' => [
'class' => 'yii\web\AssetBundle',
'basePath' => '@webroot',
'baseUrl' => '@web',
'js' => 'bundle/{hash}.js',
'css' => 'bundle/{hash}.css',
],
],
'assetManager' => [
'basePath' => '@webroot/assets',
'baseUrl' => '@web/assets'
],
];