While working on new project with Yii2, I’ve decided to use new AssetBundle to leverage it’s compressing and converting functionality later on. It’s great addition to Yii. The concept of asset bundles on it’s own is great even without compressing and converting, but…
Unfortunately I’ve noticed that there is no any way to define where the asset bundle should be inserted on page. View::registerJs has second argument, where you can define position on page. AssetBundle class uses the same function to register all js assets with default/empty argument (meaning that assets are inserted in head section). But jQuery for example can (usually must) be loaded in right before closing body tag. And it is good practice to load jQuery and other heavy libraries there, so that the page is loaded faster (content of the page).
Won’t it be reasonable to add an option to asset bundle class to define where to load js scripts?
Do I need to open issue or even apply patch for it?
(I just wanted to listen for an opinion of other devs)