Skip to content

Instantly share code, notes, and snippets.

@o-shabashov
Created May 29, 2016 22:43
Show Gist options
  • Save o-shabashov/45f9b84f3218a3ffaf679ce4af1afd0c to your computer and use it in GitHub Desktop.
Save o-shabashov/45f9b84f3218a3ffaf679ce4af1afd0c to your computer and use it in GitHub Desktop.
Yii2 force clean assets cache
<?php
// Global in config/web.php
'components' => [
// ...
'assetManager' => [
'forceCopy' => YII_DEBUG,
],
// ...
]
?>
OR
<?php
// In specific AssetBundle
public $publishOptions = [
'forceCopy' => YII_DEBUG,
];
?>
OR
<?php
// List Assets in config/web.php
'components' => [
'assetManager' => [
'class' => 'yii\web\AssetManager',
'bundles' => [
'yii\bootstrap\BootstrapAsset' => [
'forceCopy' => YII_DEBUG,
],
],
],
],
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment