You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have added js-cookie as a "repository" of type "drupal-library" which forces Drupal to download the JavaScript to docroot/libraries and then include it into the JS package for the site. (Based on this comment.) This was done for #4505 to stop the library from loading from a CDN. (PR #4551)
In reality it would be best if the version of js-cookie was managed by the JS Cookie module itself. We are waiting on issue 339061 to be completed via this merge request.
If that goes through then the best option is probably to do the following (from their readme):
Install library via composer (Merge Plugin)
If you are using the Composer Merge Plugin you can add the composer.libraries.json to your project's composer.json:
Doing this allows the version of JS Cookie that we have installed by managed by the module itself. Otherwise if the module changes we are left with an orphaned JS cookie library still being installed.
This does require exploring the composer merge plugin, which would be required to utilize this.
The text was updated successfully, but these errors were encountered:
jfrank-nih
changed the title
Use composer merge plugin to install js_cookie
Explore using composer merge plugin to install js_cookie
Jan 23, 2025
We have added
js-cookie
as a "repository" of type "drupal-library" which forces Drupal to download the JavaScript todocroot/libraries
and then include it into the JS package for the site. (Based on this comment.) This was done for #4505 to stop the library from loading from a CDN. (PR #4551)cgov-digital-platform/composer.json
Lines 17 to 30 in b843892
In reality it would be best if the version of
js-cookie
was managed by the JS Cookie module itself. We are waiting on issue 339061 to be completed via this merge request.If that goes through then the best option is probably to do the following (from their readme):
Doing this allows the version of JS Cookie that we have installed by managed by the module itself. Otherwise if the module changes we are left with an orphaned JS cookie library still being installed.
This does require exploring the composer merge plugin, which would be required to utilize this.
The text was updated successfully, but these errors were encountered: