Can we combine <script> tags from partials at the bottom of the rendered HTML (like in Rails does with yield tags
For HTML rendering speed, it's advisable to have
But when we have Marko partials, can we combine script tags to be yielded/rendered outside the partial's own block?
I may be misunderstanding your question however it sounds like your issue is actually related to the build tooling (lasso or web pack). In lasso if you have bundlingEnabled: true all bundled javascript will be placed in a single script tag which you can append to the body.
Please let me know if I've misunderstood.
I think I understand what this issue is asking for now. We can't change the behavior of existing script tags, but we could add something like:
<append-script>
console.log("hello");
</append-script>
Which would be added to the end of the body or flush. This would be a good edition to the tags repo and so I'll move the issue there.