Problem/Motivation

When scanning libraries.yml for external JavaScript URLs, SriConfigurationForm overwrites the collected paths on each loop iteration instead of appending them. Libraries with multiple external JS files only show the last one on the configuration form.

Steps to reproduce

Define a library with more than one external JS file, for example:

floating-ui:
  js:
    "https://cdn.jsdelivr.net/npm/@floating-ui/core@1.5.0": { external: true }
    "https://cdn.jsdelivr.net/npm/@floating-ui/dom@1.5.3": { external: true }

Visit /admin/config/system/sri-configuration.
Observe that only one of the two URLs appears for that library.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

ben.hamelin created an issue. See original summary.

ben.hamelin’s picture

Status: Active » Needs review