Open sahilr2050 opened 9 months ago
@sahilr2050 There is no need for the adapter
property, as all of your assets are simply copied from one directory to another one using the \yii\web\AssetManager::publishDirectory
method which is a part of the Yii2 framework. The example you provided in the main-local.php
snippet is sufficient for both development and production environments. On some of the projects I am in charge of, I use pretty the same configuration for the LocalAssetManager::class
.
And this is how I deal with different environments:
if (YII_ENV_PROD) {
$config['components']['assetManager'] = [
'class' => white43\CloudAssetManager\CloudAssetManager::class,
// ...
];
} else {
$config['components']['assetManager'] = [
'class' => white43\CloudAssetManager\LocalAssetManager::class,
// ...
];
}
Yes, I did same. Thanks for the library.
I am using below settings
main.php
For local development
main-local.php
I can see in LocalAssetManager there is no property with Adapter. Can you please define all the parameters in
BaseAssetManager
or can you suggest alternative way to work like above.