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
This commit is contained in:
parent
9877f32efa
commit
34013b5ab9
2 changed files with 4 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
output: "standalone",
|
||||
serverExternalPackages: ["better-sqlite3"],
|
||||
images: {
|
||||
unoptimized: true
|
||||
},
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
"@monaco-editor/react": "^4.7.0",
|
||||
"@xyflow/react": "^12.10.1",
|
||||
"bcryptjs": "^3.0.3",
|
||||
"better-sqlite3": "^12.6.2",
|
||||
"confbox": "^0.2.4",
|
||||
"express": "^5.2.1",
|
||||
"fs": "^0.0.1-security",
|
||||
|
|
@ -38,6 +37,9 @@
|
|||
"uuid": "^13.0.0",
|
||||
"zustand": "^5.0.10"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"better-sqlite3": "^12.6.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/postcss": "^4.1.18",
|
||||
"esbuild": "^0.27.4",
|
||||
|
|
|
|||
Loading…
Reference in a new issue