Provide local player if exists in /libraries

Created on 21 December 2023, over 1 year ago

Let's say you have the Asset Packagist added in your project root composer.json's repositories section:

    ...
    {
      "type": "composer",
      "url": "https://asset-packagist.org"
    },
    ...

And you have required composer require composer/installers and then installer-types and installer-paths configured like this:

    ...
    "installer-types": ["bower-asset", "npm-asset"],
    "installer-paths": {
      "web/libraries/{$name}": ["type:drupal-library", "type:bower-asset", "type:npm-asset"],
      ...

Then you can simply run composer require npm-asset/lottiefiles--lottie-interactivity npm-asset/lottiefiles--lottie-player to download the player and interactivity libraries into your web root's libraries/ directory.

Now we only need to tell Drupal to use these libraries instead of the ones from the CDN.

Feature request
Status

Active

Version

2.0

Component

Code

Created by

leymannx Berlin

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024