{% if is_esi_available() %}
{# render ESI natively in order to generate predictable URIs that can be PURGEd (see `EsiController`) #}
{# note: Varnish does not support ESI alt/onerror attributes #}
<esi:include src="{{ path(route, routeParams) }}" />
{% else %}
{# fallback: render via sub-request (performance hit) #}
{{ render(path(route, routeParams)) }}
{% endif %}