[PR #5631] chore(organization): fix client side import server side code #14374

Closed
opened 2026-04-13 09:26:38 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/better-auth/better-auth/pull/5631

State: closed
Merged: Yes


Summary by cubic

Prevents server-only code from being bundled into the client by switching to a type-only import and tightening the Vite e2e test. Keeps the client build free of Node APIs like async_hooks.

  • Bug Fixes
    • Use import type for OrganizationPlugin to avoid runtime imports on the client.
    • Remove server entry from the Vite fixture to build only the client.
    • Update e2e Vite test to fail if build output contains unexpected server-side strings (e.g., async_hooks).
**Original Pull Request:** https://github.com/better-auth/better-auth/pull/5631 **State:** closed **Merged:** Yes --- <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Prevents server-only code from being bundled into the client by switching to a type-only import and tightening the Vite e2e test. Keeps the client build free of Node APIs like async_hooks. - **Bug Fixes** - Use `import type` for `OrganizationPlugin` to avoid runtime imports on the client. - Remove `server` entry from the Vite fixture to build only the client. - Update e2e Vite test to fail if build output contains unexpected server-side strings (e.g., async_hooks). <!-- End of auto-generated description by cubic. -->
GiteaMirror added the pull-request label 2026-04-13 09:26:38 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#14374