- Remove output: standalone to keep migration/seed workflow - Restore original Dockerfile structure with full node_modules copy - Keep serverExternalPackages for @elysiajs/static and elysia to fix the Html prerender error caused by dynamic import in @elysiajs/static - Keep NODE_ENV=production before build step Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
26 lines
659 B
TypeScript
26 lines
659 B
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const nextConfig: NextConfig = {
|
|
serverExternalPackages: ['@elysiajs/static', 'elysia'],
|
|
experimental: {},
|
|
allowedDevOrigins: [
|
|
"http://192.168.1.82:3000", // buat akses dari HP/device lain
|
|
"http://localhost:3000", // akses lokal
|
|
],
|
|
async headers() {
|
|
return [
|
|
{
|
|
source: '/assets/:path*', // Path ke folder gambar
|
|
headers: [
|
|
{
|
|
key: 'Cache-Control',
|
|
value: 'public, max-age=3600, stale-while-revalidate=600', // Cache selama 1 jam, validasi ulang setelah 10 menit
|
|
},
|
|
],
|
|
},
|
|
];
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|