Answer the question
In order to leave comments, you need to log in
How to change the order of connecting scripts in Yii2?
The situation is this, I need to connect jquery-ui.js at the beginning and then bootstrap.js
By default, bootstrap is connected at the beginning.
It seems like dependencies are set in assets, but I don’t understand how to change the order of connecting these scripts. And no matter how the order is in the assets, I don’t see any changes.
public $depends = [
'yii\web\YiiAsset',
'yii\web\JqueryAsset',
'yii\bootstrap\BootstrapAsset',
'yii\bootstrap\BootstrapPluginAsset',
];
Answer the question
In order to leave comments, you need to log in
We need to make it so that boostrap depends on jquery-ui. For example, declare your asset bundle for boostrap, add a dependency there.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question