[PR #4415] [MERGED] fix: cloudflare build warning with node:sqlite #13618

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4415
Author: @himself65
Created: 9/4/2025
Status: Merged
Merged: 9/4/2025
Merged by: @himself65

Base: canaryHead: himself65/2025/09/03/build


📝 Commits (2)

  • 8bf3cbe fix: cloudflare build warning with node:sqlite
  • 12a8132 fix: cloudflare build warning with node:sqlite

📊 Changes

2 files changed (+23 additions, -1 deletions)

View changed files

📝 e2e/smoke/test/cloudflare.spec.ts (+15 -0)
📝 packages/better-auth/src/adapters/kysely-adapter/dialect.ts (+8 -1)

📄 Description

Fixes: https://github.com/better-auth/better-auth/issues/4404


Summary by cubic

Prevents Cloudflare build warnings by stopping Vite/Webpack from pre-bundling node:sqlite in the Kysely adapter. Uses dynamic import hints so sqlite is loaded only at runtime. Fixes better-auth/better-auth#4404.

  • Bug Fixes
    • Added /* @vite-ignore / and / webpackIgnore: true */ to the node:sqlite dynamic import inside the existing try/catch.

🔄 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/4415 **Author:** [@himself65](https://github.com/himself65) **Created:** 9/4/2025 **Status:** ✅ Merged **Merged:** 9/4/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2025/09/03/build` --- ### 📝 Commits (2) - [`8bf3cbe`](https://github.com/better-auth/better-auth/commit/8bf3cbeae83271456e281bf02ded868ad60bb851) fix: cloudflare build warning with `node:sqlite` - [`12a8132`](https://github.com/better-auth/better-auth/commit/12a81323b4b1d9ca3492be06c05739db47eb7a18) fix: cloudflare build warning with `node:sqlite` ### 📊 Changes **2 files changed** (+23 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `e2e/smoke/test/cloudflare.spec.ts` (+15 -0) 📝 `packages/better-auth/src/adapters/kysely-adapter/dialect.ts` (+8 -1) </details> ### 📄 Description Fixes: https://github.com/better-auth/better-auth/issues/4404 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Prevents Cloudflare build warnings by stopping Vite/Webpack from pre-bundling node:sqlite in the Kysely adapter. Uses dynamic import hints so sqlite is loaded only at runtime. Fixes better-auth/better-auth#4404. - **Bug Fixes** - Added /* @vite-ignore */ and /* webpackIgnore: true */ to the node:sqlite dynamic import inside the existing try/catch. <!-- 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:01:58 -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#13618