-
Notifications
You must be signed in to change notification settings - Fork 13
Description
unpkg.com is down right now in multiple regions, we're affected by this:
I guess it will probably be fixed soon. However, this is a good time to talk about the hardcoded dependency on this CDN in the plugin :-)
We're using doublesecretagency\googlemaps\helpers\GoogleMaps::getAssets(), which hardcodes the URL to the markercluster library as https://unpkg.com/@googlemaps/markerclusterer/dist/index.min.js.
It would be good to make this confiurable:
- Allow a custom CDN domain. As suggested in the issue https requests redirecting to http unpkg/unpkg#443, switching to
cdn.jsdelivr.netwould fix the issue for now. - Allow hosting those resources locally.
I know we don't have to use the helper function and can instead include those assets manually. But I don't want to manage the list of dependencies manually, because then I have to always make sure that I'm using the correct versions whenever I update the plugin. Having the plugin tell me which dependencies and which versions I need is great, we just need a bit more control over the origin server.