Closed dr-codswallop closed 1 year ago
How exactly does switching from one CDN to another help solve the issue of stability? The unpkg CDN is powered by Cloudflare and is the official recommended CDN for loading htmx. My recommendation would be to self-host htmx (or use your CDN of choice) if this is a concern.
In case of unpkg the downtime is not because of Cloudflare but because their origin goes down and most files are not in Cloudflare's cache. Its also completely unmaintained.
If that's the case then I think it would be worthwhile convincing htmx to change its recommendation, as Sprig will follow suit. Feel free to loop me into a GitHub issue.
I’ve decided to switch to hosting htmx locally, as the case is made for not using CDNs in production, in the upcoming release.
Released in version 2.6.0.
Please provide a clear and concise description of your feature request, including:
What the problem is and what you would like to have happen. Recently, multiple unpkg downtimes left alot of my sites unusable - pulling in Sprig and/or AlpineJS. Seems the js community now favours jsdelivr over unpkg for greater stability and uptime.
Any alternative solutions or features you have considered. I realise we're free to specify our own replacement for
{{ sprig.script }}
but in the interest to keep everything self-contained and more stable consider switching the cdn service from unpkg to jsdelivrhttps://cdn.jsdelivr.net/npm/htmx.org@1.x.x/dist/htmx.js