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
Comment #2
jfeltkampThis 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.
Comment #3
jfeltkampSince 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).
Comment #4
design.er commentedI 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 installand the local library will be downloaded automatically as if it was implemented in the composer.json via asset-packagist?Comment #5
jfeltkampYes, you can deploy it without taking care of that. It should work.
Comment #6
design.er commentedAmazing, thank you! :)
I'll mark this issue as fixed.
Comment #7
design.er commented