[PR #7009] [CLOSED] fix(build): externalize @better-auth/core to fix Expo/Metro resolution #15266

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7009
Author: @anantasharma510
Created: 12/26/2025
Status: Closed

Base: canaryHead: fix/expo-module-resolution


📝 Commits (1)

  • 30a862b fix(build): externalize @better-auth/core to prevent incorrect relative path rewriting

📊 Changes

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

View changed files

📝 packages/better-auth/tsdown.config.ts (+1 -0)

📄 Description

When using Expo/Metro, the bundler was incorrect rewriting @better-auth/core imports to relative paths causing module resolution errors. This PR adds @better-auth/core to external in tsdown config to preserve correct import paths.


Summary by cubic

Externalizes @better-auth/core in tsdown config so bundlers keep the package import and don’t rewrite it to relative paths. Fixes Expo/Metro module resolution errors.

Written for commit 30a862bc5b. Summary will update automatically on new commits.


🔄 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/7009 **Author:** [@anantasharma510](https://github.com/anantasharma510) **Created:** 12/26/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `fix/expo-module-resolution` --- ### 📝 Commits (1) - [`30a862b`](https://github.com/better-auth/better-auth/commit/30a862bc5b7b14da27f96db66b22acd5b2bed179) fix(build): externalize @better-auth/core to prevent incorrect relative path rewriting ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/tsdown.config.ts` (+1 -0) </details> ### 📄 Description When using Expo/Metro, the bundler was incorrect rewriting @better-auth/core imports to relative paths causing module resolution errors. This PR adds @better-auth/core to external in tsdown config to preserve correct import paths. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Externalizes @better-auth/core in tsdown config so bundlers keep the package import and don’t rewrite it to relative paths. Fixes Expo/Metro module resolution errors. <sup>Written for commit 30a862bc5b7b14da27f96db66b22acd5b2bed179. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <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-04-13 09:55:48 -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#15266