Skip to content
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

Fix cjs usage #382

Merged
merged 2 commits into from
Jan 7, 2025
Merged

Fix cjs usage #382

merged 2 commits into from
Jan 7, 2025

Conversation

lukasIO
Copy link
Contributor

@lukasIO lukasIO commented Jan 7, 2025

closes #381

For some reason the default export gets wrongly marked as ESM for CJS. Converting the import to a named import changes the output in dist to

var import_protocol = require("@livekit/protocol");
var import_AccessToken = require("./AccessToken.cjs");
var import_digest = require("./digest.cjs");

Copy link

changeset-bot bot commented Jan 7, 2025

🦋 Changeset detected

Latest commit: 0714a2a

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

This PR includes changesets to release 2 packages
Name Type
livekit-server-sdk Patch
agent-dispatch Patch

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

@lukasIO lukasIO requested a review from nbsp January 7, 2025 15:55
@nbsp
Copy link
Member

nbsp commented Jan 7, 2025

potentially worth auditing/removing all default exports because they don't play well with esm/cjs

@lukasIO lukasIO merged commit 81b2d3c into main Jan 7, 2025
10 checks passed
@lukasIO lukasIO deleted the lukas/fix-digest branch January 7, 2025 16:28
@github-actions github-actions bot mentioned this pull request Jan 7, 2025
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.

(0 , import_digest.default) is not a function TypeError: (0 , import_digest.default) is not a function
2 participants