Answer the question
In order to leave comments, you need to log in
How to disable Asset in Yii2?
Goodnight. I'm learning Yii2, don't hit me with your slippers.
I know how to disable assets, through the configuration, BUT: two directories are still created in the web/assets directory, jquery is located in the first, and bootstrap in the second. This is not critical, of course, but I want to understand.
Answer the question
In order to leave comments, you need to log in
Goodnight.
In order not to create directories in web/assets in the configuration file, write in the components section
'assetManager' => [
'linkAssets' => true
]
'assetManager' => [
'bundles' => [
'yii\web\JqueryAsset' => [
'js'=>[]
],
'yii\bootstrap\BootstrapPluginAsset' => [
'js'=>[]
],
'yii\bootstrap\BootstrapAsset' => [
'css' => [],
],
],
],
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question