Loading order into Asset

Hi,

I have a couple of related js files I need to use together in every context. So, I wrote a single asset.

But I need to set a loading order between them. Is it possible?

Thanks!

Have you checked for ‘depends’ attribute?

http://www.yiiframework.com/doc-2.0/guide-structure-assets.html

Ciao Fabrizio,

yes, I’ve checked, but “depends” accepts Assets, not js files. I need to sort files in the same asset.

If you need to make dependencies in Asset, you could create a configuration with two bundles (one for each javascript) and use ‘depends’ to make relationship.