Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I couldn't figure out how to do this when migrating from drupal_add_js()
, but it looks like it's just a matter of adding the key header: true in the libraries.yml file.
See line 324 here: https://api.drupal.org/api/drupal/core!core.libraries.yml/8
Comments
Comment #3
carwin CreditAttribution: carwin at Lullabot commentedFixed this in the 8.x-1.x-dev branch.
Comment #4
carwin CreditAttribution: carwin at Lullabot commentedAnd now it's in 8.x-1.1.
Comment #5
ruplmy hero! \o/
Comment #6
carwin CreditAttribution: carwin at Lullabot commented