Register JS and FIle rendering views

Number 1

    public $js = [

use backend\assets\AppAsset;

Number 2

use yii\bootstrap4\Modal;
use yii\bootstrap4\ActiveForm;

Number 3

$this->registerJsFile('@web/dist/js/custom/bootstrap-notify.min.js', ['depends' => [\yii\web\JqueryAsset::className()]]);
$this->registerJsFile('@web/dist/js/custom/jquery.number.js', ['depends' => [\yii\web\JqueryAsset::className()]]);

I discovered the issue when yii2 renders a JS syntax file above. When the page is rendered, the sequence will be like this

Number 3
Number 2
Number 1


and it looks like the bootstap bundle should be positioned below jquery and they should be minimized to speed up page loading


thank you