[PR #1929] [MERGED] Remix documentation: Change file name from `auth.client.ts to auth-client.ts` #4074

Closed
opened 2026-03-13 11:31:30 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/1929
Author: @VIEWVIEWVIEW
Created: 3/22/2025
Status: Merged
Merged: 3/22/2025
Merged by: @Bekacru

Base: mainHead: patch-1


📝 Commits (1)

  • 194523b Remix documentation: Change file name from auth.client.ts to auth-client.ts

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 docs/content/docs/integrations/remix.mdx (+2 -2)

📄 Description

auth.client.ts will trigger code splitting. While this would be fine for the server component (auth.server.ts, which needs to stay hidden to end users), putting the authClient in a client only component will force the authClient out of the server bundle. This causes authClient to be undefined during SSR. This makes the integration guide non functional.

Please note that the example you have about Remix is already correctly not using .client.ts.
https://github.com/better-auth/better-auth/blob/main/examples/remix-example/app/lib/auth-client.ts

Read: https://reactrouter.com/explanation/special-files#client-modules


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/1929 **Author:** [@VIEWVIEWVIEW](https://github.com/VIEWVIEWVIEW) **Created:** 3/22/2025 **Status:** ✅ Merged **Merged:** 3/22/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `patch-1` --- ### 📝 Commits (1) - [`194523b`](https://github.com/better-auth/better-auth/commit/194523bca081284922573fbe6ddd385d8ee6d0a7) Remix documentation: Change file name from ``auth.client.ts`` to ``auth-client.ts`` ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/integrations/remix.mdx` (+2 -2) </details> ### 📄 Description ``auth.client.ts`` will trigger code splitting. While this would be fine for the server component (``auth.server.ts``, which needs to stay hidden to end users), putting the authClient in a client only component will force the authClient out of the server bundle. This causes authClient to be undefined during SSR. This makes the integration guide non functional. Please note that the example you have about Remix is already correctly *not* using ``.client.ts``. https://github.com/better-auth/better-auth/blob/main/examples/remix-example/app/lib/auth-client.ts Read: https://reactrouter.com/explanation/special-files#client-modules --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 11:31:30 -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#4074