Skip to content

Make jsDelivr CDN serve the same file as UNPKG#171

Merged
1cg merged 1 commit intobigskysoftware:mainfrom
scrhartley:jsdelivr
Jul 18, 2025
Merged

Make jsDelivr CDN serve the same file as UNPKG#171
1cg merged 1 commit intobigskysoftware:mainfrom
scrhartley:jsdelivr

Conversation

@scrhartley
Copy link
Contributor

@scrhartley scrhartley commented Jul 18, 2025

Description

Currently jsDelivr is referenced on the htmx site, but some serve the esm version.
e.g. https://cdn.jsdelivr.net/npm/htmx-ext-head-support mentioned in https://htmx.org/extensions/head-support/
e.g. https://cdn.jsdelivr.net/npm/htmx-ext-response-targets@2.0.2 mentioned in https://htmx.org/docs/

This PR updates each extension's package.json so that there is a value for jsdelivr in addition to the existing unpkg one.

Htmx version: latest (n/a)
Used extension(s) version(s): n/a

Corresponding issue: bigskysoftware/htmx#3380

Testing

I ran npm install for each extension to verify that the package.json is still valid.
The final check will be looking at the CDN when new versions of the extensions are released.

Checklist

  • I have read the contribution guidelines
  • I ran the test suite locally (npm run test) and verified that it succeeded

@netlify
Copy link

netlify bot commented Jul 18, 2025

Deploy Preview for htmx-extensions canceled.

Name Link
🔨 Latest commit 21607fb
🔍 Latest deploy log https://app.netlify.com/projects/htmx-extensions/deploys/687a5ca6d2eb8e00086fca72

@1cg 1cg merged commit 21ae329 into bigskysoftware:main Jul 18, 2025
24 checks passed
@1cg
Copy link
Contributor

1cg commented Jul 18, 2025

Thank you!

@MichaelWest22
Copy link
Contributor

@1cg @scrhartley this looks like it should fix the issue but it will likely only apply if we manually bump the minor version of all the extensions so it can publish a new version as it will only apply when a new version is pushed up to npm for it to be read by jsdelivr. And npm skips updating existing versions by default which is why we need new version numbers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants