import { config as loadEnv } from 'dotenv'; import type { NextConfig } from 'next'; // The monorepo keeps one .env at the root; Next only looks in the app directory. loadEnv({ path: '../../.env' }); const config: NextConfig = { reactStrictMode: true, // The workspace packages ship TypeScript source, not build output. transpilePackages: ['@linkder/db', '@linkder/shared'], images: { remotePatterns: [ { protocol: 'https', hostname: 'picsum.photos' }, { protocol: 'https', hostname: '**.r2.dev' }, ], }, // postgres-js opens raw sockets; it must not be bundled into the server chunk. serverExternalPackages: ['postgres'], }; export default config;