Next.js was producing the same chunk hash across builds, causing browsers to serve stale cached JS even after redeployment. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
36 lines
896 B
JavaScript
36 lines
896 B
JavaScript
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
output: 'standalone',
|
|
reactStrictMode: true,
|
|
// Force unique build ID to bust browser caches on each deploy
|
|
generateBuildId: () => `build-${Date.now()}`,
|
|
// TODO: Remove after fixing type incompatibilities from restore
|
|
typescript: {
|
|
ignoreBuildErrors: true,
|
|
},
|
|
// Allow images from backend
|
|
images: {
|
|
remotePatterns: [
|
|
{
|
|
protocol: 'http',
|
|
hostname: 'localhost',
|
|
},
|
|
{
|
|
protocol: 'http',
|
|
hostname: 'macmini',
|
|
},
|
|
{
|
|
protocol: 'https',
|
|
hostname: 'macmini',
|
|
},
|
|
],
|
|
},
|
|
// Environment variables
|
|
env: {
|
|
NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL || 'https://macmini:8001',
|
|
NEXT_PUBLIC_OLD_ADMIN_URL: process.env.NEXT_PUBLIC_OLD_ADMIN_URL || 'http://localhost:3000/admin',
|
|
},
|
|
}
|
|
|
|
module.exports = nextConfig
|