67 lines
1.4 KiB
JavaScript
67 lines
1.4 KiB
JavaScript
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
reactStrictMode: true,
|
|
transpilePackages: ['@bmad/core', '@bmad/ui'],
|
|
|
|
// Enable standalone output for Docker
|
|
output: 'standalone',
|
|
|
|
experimental: {
|
|
serverComponentsExternalPackages: ['@bmad/core'],
|
|
},
|
|
|
|
images: {
|
|
domains: ['avatars.githubusercontent.com'],
|
|
// Allow images from any domain in production
|
|
remotePatterns: [
|
|
{
|
|
protocol: 'https',
|
|
hostname: '**',
|
|
},
|
|
],
|
|
},
|
|
|
|
// Environment variables available at build time
|
|
env: {
|
|
NEXT_PUBLIC_APP_VERSION: process.env.npm_package_version || '1.0.0',
|
|
},
|
|
|
|
// Headers for security
|
|
async headers() {
|
|
return [
|
|
{
|
|
source: '/(.*)',
|
|
headers: [
|
|
{
|
|
key: 'X-DNS-Prefetch-Control',
|
|
value: 'on',
|
|
},
|
|
{
|
|
key: 'X-Frame-Options',
|
|
value: 'SAMEORIGIN',
|
|
},
|
|
{
|
|
key: 'X-Content-Type-Options',
|
|
value: 'nosniff',
|
|
},
|
|
],
|
|
},
|
|
];
|
|
},
|
|
|
|
// Rewrites for API proxy (optional, for development)
|
|
async rewrites() {
|
|
const apiUrl = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:4000';
|
|
return process.env.NODE_ENV === 'development'
|
|
? [
|
|
{
|
|
source: '/api/:path*',
|
|
destination: `${apiUrl}/api/:path*`,
|
|
},
|
|
]
|
|
: [];
|
|
},
|
|
};
|
|
|
|
module.exports = nextConfig;
|