The cookiesjsr.min.js and cookiesjsr.min.css are currently served from a CDN.
The Drupal standard is to host 3rd party libraries inside the /libraries folder. That way the developer has maximum flexibility to use a custom CDN (eg. Cloudflare) of choice for all/specific project files or if the projects simply requires to have everything hosted locally due to specific policies or technical reasons.

Maybe a good compromise is to provide a setting on the configuration page wether to use the offered CDN or host the files locally in the /libraries folder.

For storing it locally https://asset-packagist.org/ is a great solution. That way users could manage the library via composer.json as any other Drupal module without manual work.

Comments

design.er created an issue. See original summary.

jfeltkamp’s picture

This is already in progress an will be available before the module becomes stable.
It turns out, that the library has some page speed issues. Actually I'm working on a Pre-loader that let the app run much faster.

jfeltkamp’s picture

Version: 1.0.x-dev » 1.0.0-rc4
Status: Active » Needs review

Since 1.0.0-rc4 library can be hosted locally.
I added a composer dependecy so that the library will installed on update. Also added a composer.json to the Cookies JSR library where the library is declared of type "drupal-library". I think that makes it easier for devs not familiar with asset-packagist. But it's still necessary to uncheck the CDN-checkbox in the config (for those who install the module with manual download).

design.er’s picture

Status: Needs review » Reviewed & tested by the community

I tested it today. The local version works perfectly fine, thank you very much!
Do I understand correctly that I don't have to take care of the library when deploying a website, so I can run composer install and the local library will be downloaded automatically as if it was implemented in the composer.json via asset-packagist?

jfeltkamp’s picture

Yes, you can deploy it without taking care of that. It should work.

design.er’s picture

Status: Reviewed & tested by the community » Fixed

Amazing, thank you! :)

I'll mark this issue as fixed.

design.er’s picture

Status: Fixed » Closed (fixed)