Replacing asset or re-ordering assets

Is there a way to remove specific asset or find out what asset bundles used in current page so I can re-order javascript files?

Let me illustrate my problem. In the generated HTML file, the javascript files section:


<script src="/assets/1f0fee87/jquery.js"></script>

<script src="/assets/3f709036/yii.js"></script>

// some other javascript files from vendor

<script src="/assets/59dcaa34/js/x.js"></script>

// the following are included in customized asset bundles

<script src="/project/assets/plugins/jquery-slider/jquery.sidr.min.js"></script>

<script src="/project/assets/plugins/jquery-slimscroll/jquery.slimscroll.min.js"></script>

<script src="/project/assets/plugins/boostrapv3/js/bootstrap.min.js"></script>

<script src="/project/assets/plugins/breakpoints.js"></script>

// other customized asset bundle files


This currently causes conflict because x.js needs to be after bootstrap.min.js, and bootstrap.min.js must be positioned after those 2 js files.

Is there a way to find out the name of asset bundle x belongs to (it comes from vendor) and move it after bootstrap.min.js? Or what is the best solution for this?

Debug toolbar - click - Assets :)

Then fix the depends array in the WebAsset’s.

Why I never noticed this? Thanks. Will look into it.

You might want to take a different approach to this by disabling the assets and using the tool chain outlined in the thread below to get better control over asset files and compile them into a single .css .js file.