skeeks-semenov / yii2-assets-auto-compress

Automatic compilation of js + css + html
https://skeeks.com/
BSD 3-Clause "New" or "Revised" License
157 stars 43 forks source link

$this->fileGetContents( Url::to( \Yii::getAlias('@web'.$fileCode), true) ) error #7

Closed krissss closed 8 years ago

krissss commented 8 years ago

when compress css files and js files,you foreach them and then getContents with Url::to( \Yii::getAlias('@web'.$fileCode), true) It may course a bug

for example: if my asset $fileCode is “/admin/assets/a466841a/index.css” and my web (use \Yii::getAlias('@web')) is "/admin" then this result will be "/admin/admin/assets/a466841a/index.css" now, you see, you can't find this file!

I think you can replace "Url::to( \Yii::getAlias('@web'.$fileCode), true)" with "Url::to($fileCode), true)"

skeeks-semenov commented 8 years ago

@krissss Thank you https://github.com/skeeks-semenov/yii2-assets-auto-compress/pull/8