Skip to content

Change .umd.cjs dist files to .umd.js to satisfy jsdelivr #1687

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from

Conversation

eoghanmurray
Copy link
Contributor

The verdict from jsdelivr is that they are not going to change the application/node mime type for (see jsdelivr/jsdelivr#18584 ), so we need to revert the extension to .umd.js in order that these files can be used in a browser via jsdelivr as per docs (prior to #1033 we shipped these as .js)

…pplication/node` mime type for (see jsdelivr/jsdelivr#18584 ), so we need to revert the extension to `.umd.js` in order that these files can be used in a browser via jsdelivr as per docs (prior to rrweb-io#1033 we shipped these as `.js`)
Copy link

changeset-bot bot commented Apr 25, 2025

🦋 Changeset detected

Latest commit: 04cb195

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

eoghanmurray added a commit to eoghanmurray/rrweb that referenced this pull request Jun 12, 2025
…th a plain `.js` instead of `.cjs` extension, as the latter won't be served with the correct mime type by jsdelivr

 - rrweb-io#1687 (just rename `.cjs` to `.js`) was rejected due to the the 'dual package hazard' [1], and produces a warning when run through publint.dev (which was the original motivation for changing to \.cjs)
 - jsdelivr won't be serving `.cjs` with the correct mime type: jsdelivr/jsdelivr#18584

[1] https://nodejs.org/en/learn/modules/publishing-a-package#the-dual-package-hazard
@eoghanmurray eoghanmurray mentioned this pull request Jun 12, 2025
eoghanmurray added a commit to eoghanmurray/rrweb that referenced this pull request Jun 12, 2025
…th a plain `.js` instead of `.cjs` extension, as the latter won't be served with the correct mime type by jsdelivr

 - rrweb-io#1687 (just rename `.cjs` to `.js`) was rejected due to the the 'dual package hazard' [1], and produces a warning when run through publint.dev (which was the original motivation for changing to \.cjs)
 - jsdelivr won't be serving `.cjs` with the correct mime type: jsdelivr/jsdelivr#18584

[1] https://nodejs.org/en/learn/modules/publishing-a-package#the-dual-package-hazard
@eoghanmurray
Copy link
Contributor Author

#1704 is probably better than this given the 'Dual Package' hazard
https://nodejs.org/en/learn/modules/publishing-a-package#the-dual-package-hazard

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.

1 participant