My config file like this:
'bundles' => [
'core\modules\admin\assets\AdminLteAsset',
'core\modules\home\assets\AppAsset',
],
'targets' => [
'frontend' => [
'class' => 'yii\web\AssetBundle',
'basePath' => '@webroot/assets',
'baseUrl' => '@web/assets',
'js' => 'all-frontend-{hash}.js',
'css' => 'all-frontend-{hash}.css',
'depends' => [
'core\modules\home\assets\AppAsset'
],
],
'admin' => [
'class' => 'yii\web\AssetBundle',
'basePath' => '@webroot/assets',
'baseUrl' => '@web/assets',
'js' => 'all-admin-{hash}.js',
'css' => 'all-admin-{hash}.css',
], // Include all remaining assets
],
after compress, i get the config file like below:
... others code
'core\\modules\\admin\\assets\\AdminLteAsset' => [
'sourcePath' => null,
'js' => [],
'css' => [],
'depends' => [
'weison\\alert\\LayerAsset',
'dmstr\\web\\AdminLteAsset',
'admin',
],
],
... others code
becuase the new depends ‘admin’ contain ‘weison\\alert\\LayerAsset’,‘dmstr\\web\\AdminLteAsset’ yet,so i want delete depends in the generate config file automatically after compress, how can I do this.