Skip to content

fix: add workerd condition for password export#17

Open
GautamBytes wants to merge 1 commit into
better-auth:mainfrom
GautamBytes:fix/workerd-password-export
Open

fix: add workerd condition for password export#17
GautamBytes wants to merge 1 commit into
better-auth:mainfrom
GautamBytes:fix/workerd-password-export

Conversation

@GautamBytes
Copy link
Copy Markdown

@GautamBytes GautamBytes commented May 16, 2026

Summary

  • Add a workerd condition for the ./password export.
  • Route Cloudflare Workers resolution to the node-compatible password implementation when nodejs_compat is enabled.
  • Add a regression test for the package export map.

Why

Wrangler uses the workerd conditional export key when bundling Cloudflare Workers. Without a workerd condition, @better-auth/utils/password falls through to the default ESM export and bundles the pure JS fallback instead of password.node.mjs, even when Workers has Node compatibility enabled.

Related to better-auth/better-auth#9649.

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