Files
caddy-proxy-manager/next.config.mjs
akanealw 99819b70ff
Some checks failed
Build and Push Docker Images (Trusted) / build-and-push (., docker/caddy/Dockerfile, caddy) (push) Has been cancelled
Build and Push Docker Images (Trusted) / build-and-push (., docker/l4-port-manager/Dockerfile, l4-port-manager) (push) Has been cancelled
Build and Push Docker Images (Trusted) / build-and-push (., docker/web/Dockerfile, web) (push) Has been cancelled
Tests / test (push) Has been cancelled
added caddy-proxy-manager for testing
2026-04-21 22:49:08 +00:00

29 lines
926 B
JavaScript
Executable File

// When building under Node.js (not Bun), redirect bun:sqlite to a better-sqlite3 shim
// so `next build` works locally without Bun installed.
const isBun = typeof globalThis.Bun !== 'undefined';
/** @type {import('next').NextConfig} */
const nextConfig = {
serverExternalPackages: isBun ? ['bun:sqlite'] : ['better-sqlite3'],
...(!isBun && {
turbopack: {
resolveAlias: {
'bun:sqlite': './tests/helpers/bun-sqlite-compat.ts',
'drizzle-orm/bun-sqlite/migrator': 'drizzle-orm/better-sqlite3/migrator',
'drizzle-orm/bun-sqlite': 'drizzle-orm/better-sqlite3',
},
},
}),
experimental: {
serverActions: {
bodySizeLimit: '2mb'
}
},
output: 'standalone',
poweredByHeader: false,
// Security headers (CSP, etc.) are set per-request in proxy.ts middleware
// with a unique nonce, so they are NOT defined here as static headers.
};
export default nextConfig;