Reputation: 419
I have installed yii2-admin module, located in /vendor/mdmsoft/yii2-admin but I don't want it to load its own asset bundle. It there any way to disable this module asset bundle?
Upvotes: 4
Views: 2501
Reputation: 33538
Yes, it's possible and even mentioned in official docs here. One way to do it is through application config:
return [
// ...
'components' => [
'assetManager' => [
'bundles' => [
'mdm\admin\AdminAsset' => false,
],
],
],
];
Another way - during runtime through component:
\Yii::$app->assetManager->bundles['mdm\admin\AdminAsset'] = false;
Upvotes: 2