Files
dyolink/frontend/next.config.ts

35 lines
923 B
TypeScript

import type { NextConfig } from "next";
// frontend/next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
// Enable React strict mode
reactStrictMode: true,
// Disable x-powered-by header for security
poweredByHeader: false,
// Configure allowed remote image sources
images: {
remotePatterns:
process.env.NODE_ENV === 'production'
? [{ protocol: 'https', hostname: 'yourdomain.com' }]
: [{ protocol: 'http', hostname: 'localhost' }],
},
// Environment variables that will be available at build time
env: {
NEXT_PUBLIC_APP_NAME: process.env.NEXT_PUBLIC_APP_NAME,
NEXT_PUBLIC_APP_URL: process.env.NEXT_PUBLIC_APP_URL,
NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL,
},
// Output configuration
output: 'standalone', // Reduces Docker image size
// Compress with gzip
compress: true,
}
module.exports = nextConfig