D
D
Dmitry Petrik2015-03-27 12:49:18
Yii
Dmitry Petrik, 2015-03-27 12:49:18

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

1 answer(s)
A
Alexander Makarov, 2015-03-31
@SamDark

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 question

Ask a Question

731 491 924 answers to any question