fea6682024
Drops static export (STATIC_EXPORT env var) in favour of standalone for ISR. Images remotePatterns reads PB_HOSTNAME/PB_PORT env vars so Docker internal hostname works without hardcoding.
25 lines
580 B
TypeScript
25 lines
580 B
TypeScript
import type { NextConfig } from 'next';
|
|
|
|
/* PocketBase origin — used to allowlist remote images.
|
|
* PB_HOSTNAME and PB_PORT are server-only env vars; safe to read here. */
|
|
const pbHostname = process.env.PB_HOSTNAME ?? '127.0.0.1';
|
|
const pbPort = parseInt(process.env.PB_PORT ?? '8090', 10);
|
|
|
|
const nextConfig: NextConfig = {
|
|
output: 'standalone',
|
|
images: {
|
|
remotePatterns: [
|
|
{
|
|
protocol: 'http',
|
|
hostname: pbHostname,
|
|
port: String(pbPort),
|
|
},
|
|
],
|
|
},
|
|
experimental: {
|
|
viewTransition: true,
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|