fix: externalize better-sqlite3 for Next.js standalone builds

Move better-sqlite3 to optionalDependencies so npm install doesn't
fail on platforms without native build tools. Add it to
serverExternalPackages so Next.js doesn't try to bundle the native
addon into webpack chunks.

Fixes #243
Fixes #184

Thanks @East-rayyy for the contribution! Sorry for the delay in reviewing.

Co-authored-by: Ibrahim Ryan <ryan@nuevanext.com>
Made-with: Cursor
This commit is contained in:
decoluaandIbrahim Ryan committed 2026-03-23 10:22:17 +07:00
commit 312dd749fe
2 files changed
+4

No files matched your search

+3
View File
@@ -38,6 +38,9 @@
"uuid": "^13.0.0",
"zustand": "^5.0.10"
},
"optionalDependencies": {
"better-sqlite3": "^12.6.2"
},
"devDependencies": {
"@tailwindcss/postcss": "^4.1.18",
"eslint": "^9",