-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
Description
Hi there,
It seems that when adding a JS file inline trough param of Grav assets manager, the order is not respected. Inlined assets are always rendered on the last position.
e.g. this:
{% block javascripts %}
{% do assets.addJs('theme://js/manifest.js, {'priority':100, 'loading':'inline'}) %}
{% do assets.addJs('theme://js/main.js', {'priority':10}) %}
{% endblock %}
{{ assets.js }}render into:
<script src="/user/themes/mytheme/js/main.js" type="text/javascript" defer=""></script>
<script>inlined content of manifest.js file</script>It's a problem that js rendering order doesn't respect the given order in Grav assets manager params as it can break the js code.
Cheers
Reactions are currently unavailable