In web.php
config file add the following code into components array:
'assetManager' => [
'bundles' => [
'yiiootstrapBootstrapPluginAsset' => [
'js'=>[]
],
],
],
To be more comprehensive:
in order to disable Css (bootstrap.css):
'assetManager' => [
'bundles' => [
'yiiootstrapBootstrapAsset' => [
'css' => [],
],
],
],
in order to disable JS (bootstrap.js):
'assetManager' => [
'bundles' => [
'yiiootstrapBootstrapPluginAsset' => [
'js'=>[]
],
],
],
in order to disable JQuery (jquery.js)
'assetManager' => [
'bundles' => [
'yiiwebJqueryAsset' => [
'js'=>[]
],
],
],
In order to have all of them disabled:
'assetManager' => [
'bundles' => [
'yiiwebJqueryAsset' => [
'js'=>[]
],
'yiiootstrapBootstrapPluginAsset' => [
'js'=>[]
],
'yiiootstrapBootstrapAsset' => [
'css' => [],
],
],
],
UPDATE
As Soju mentioned in comments, another alternative way would be disabling these files in AppAsset
class, which is located in ./assets/
, then remove the following lines:
public $depends = [
'yiiwebYiiAsset', #REMOVE
'yiiootstrapBootstrapAsset', #REMOVE
];