I think I know the answer, because I tried to attach an external library like this:
{% set location = {'type': 'external'} %}
{{ attach_library('//example.com/example.js/v3/example.js', location) }}
This did not attach the desired library, am I missing something, or is this a non-starter?
attach_library
twig extension having a second parameter. Look for the implementation of the twig extension above inDrupal\Core\Template\TwigExtension.php
in the functionattachLibrary
. What version of twig are you using? I'm in Drupal 8.2.1.