I use the below code to disable any css or js files in yii 1.1.x. view files
this Yii::app()->clientScript->scriptMap['jquery.js'] = false;
How can I do this approach in Yii 2? I don’t want to configure in config file and disable whole app?
I use the below code to disable any css or js files in yii 1.1.x. view files
this Yii::app()->clientScript->scriptMap['jquery.js'] = false;
How can I do this approach in Yii 2? I don’t want to configure in config file and disable whole app?
I also have the same problem.
The following way excludes them, don’t know if it’s the proper way.
'components'=>[
'assetManager' => [
'bundles' => [
'yii\web\JqueryAsset' => [
'js' => []
],
'yii\bootstrap\BootstrapPluginAsset' => [
'js' => []
],
'yii\bootstrap\BootstrapAsset' => [
'css' => []
]
]
]
]
i don’t think setting them to false works they have to be set to an empty array if I remember correctly.