As a first time users of Yii2, I’m trying to integrate a Bootstrap 3 theme based upon a custom variables.less file with the Yii2-bootstrap extension.
I can tell that through composer, Yii2-bootstrap has triggered the inclusion of vendor/twbs/bootstrap which it most likely is loading.
My guess is that I need to use the asset manager to have it compile my custom set of *.less files which comprise the Bootstrap 3 CSS part of framework. However it’s not clear to me how to have the asset manager ignore the default Bootstrap 3 library and use my custom files. Secondly I’m not sure where these custom files should be stored within the directory tree.
Thanks Kartik V. I managed to switch off the general Bootstrap web sources from the vendor dir.
I’ve taken the original BootstrapAssets.php file from the yii2-bootstrap extension and copied it to frontend/assets/BootstrapAssets.php, but this file is not getting processed. Only when I rename it to AppAssets.php it is processed. This is not ideal as it blocks me from adding any other assets to my app. Not sure how is supposed to be setup in Yii2.
* @author Qiang Xue <firstname.lastname@example.org>
* @since 2.0
class AppAsset extends AssetBundle
public $sourcePath = '@app/assets/bootstrap3/less';
public $css = [
public $js = [
public $depends = [