Open speker2010 opened 4 years ago
Adjusting computation of last modification time may affect performance for the cases when there are many asset files in the directory.
But the issue overall makes sense to me.
You can override $publishOptions from AssetBundle Try it in your asset bundle class:
class AppAsset extends AssetBundle { // .... public $publishOptions = [ 'forceCopy' => true ]; // .... }
What steps will reproduce the problem?
Create AssetBundle with scss source; Config scss compilation in AssetConverter; Publish resources once; Change scss; Nothing happend;
What is the expected result?
After change sources Its should update css file.
What do you get instead?
Nothing change in css
Additional info
It's check
filemtime
for 2 files before converting. For exampleassets/{hash}/main.css
andassets/{hash}/main.scss
. https://github.com/yiisoft/yii2/blob/09eacd8dc1120113032976099fd07290a4d37cd3/framework/web/AssetConverter.php#L68But! It's check only
!is_dir
and forceCopy option before publish. Maybe it's should compare filemtime for source*.scss
file and published*.scss
file. https://github.com/yiisoft/yii2/blob/09eacd8dc1120113032976099fd07290a4d37cd3/framework/web/AssetManager.php#L545