Answer the question
In order to leave comments, you need to log in
What is the correct way to create a resource dependency?
in AssetBundle there is such an array depends, I need to configure it in such a way that there would be an order for connecting scripts in the following way
1 jquery; 2 my scripts; 3 scripts in extensions.
How can this be configured?
Answer the question
In order to leave comments, you need to log in
class MyAsset {
public $js = ['my.js', 'third-party.js'];
public $depends = [YiiAsset::class];
}
class MyAsset {
public $js = ['my.js'];
public $depends = [YiiAsset::class];
}
class ThirdPartyAsset {
public $js = ['other.js'];
public $depends = [MyAsset::class];
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question