Complete Next.js website with Docker containerization: - Next.js 14 with TypeScript and Tailwind CSS - Responsive design with modern UI components - Hero section, features showcase, testimonials - FAQ section with comprehensive content - Contact forms and newsletter signup - Docker production build with Nginx - Health checks and monitoring support - SEO optimization and performance tuning Ready for integration as git submodule in main CHORUS project. Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
101 lines
2.4 KiB
JavaScript
101 lines
2.4 KiB
JavaScript
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
experimental: {
|
|
appDir: true,
|
|
},
|
|
// Enable React strict mode for better development experience
|
|
reactStrictMode: true,
|
|
|
|
// Optimize images
|
|
images: {
|
|
formats: ['image/webp', 'image/avif'],
|
|
domains: [],
|
|
dangerouslyAllowSVG: true,
|
|
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
|
|
},
|
|
|
|
// Optimize CSS
|
|
swcMinify: true,
|
|
|
|
// Bundle analyzer (uncomment to analyze bundle)
|
|
// bundleAnalyzer: {
|
|
// enabled: process.env.ANALYZE === 'true',
|
|
// },
|
|
|
|
// Compiler options for better performance
|
|
compiler: {
|
|
// Remove console.log in production
|
|
removeConsole: process.env.NODE_ENV === 'production',
|
|
},
|
|
|
|
// Output configuration for Docker deployment
|
|
output: 'standalone',
|
|
|
|
// Enable experimental features for better performance
|
|
experimental: {
|
|
optimizeCss: true,
|
|
optimizePackageImports: ['antd', 'framer-motion', 'lucide-react'],
|
|
},
|
|
|
|
// Headers for security and performance
|
|
async headers() {
|
|
return [
|
|
{
|
|
source: '/(.*)',
|
|
headers: [
|
|
{
|
|
key: 'X-Frame-Options',
|
|
value: 'DENY',
|
|
},
|
|
{
|
|
key: 'X-Content-Type-Options',
|
|
value: 'nosniff',
|
|
},
|
|
{
|
|
key: 'Referrer-Policy',
|
|
value: 'strict-origin-when-cross-origin',
|
|
},
|
|
],
|
|
},
|
|
];
|
|
},
|
|
|
|
// Webpack configuration for optimal bundling
|
|
webpack: (config, { dev, isServer }) => {
|
|
// Optimize bundle splitting
|
|
if (!dev && !isServer) {
|
|
config.optimization.splitChunks = {
|
|
chunks: 'all',
|
|
cacheGroups: {
|
|
default: {
|
|
minChunks: 1,
|
|
priority: -20,
|
|
reuseExistingChunk: true,
|
|
},
|
|
vendor: {
|
|
test: /[\\/]node_modules[\\/]/,
|
|
name: 'vendors',
|
|
priority: -10,
|
|
chunks: 'all',
|
|
},
|
|
antd: {
|
|
name: 'antd',
|
|
test: /[\\/]node_modules[\\/]antd[\\/]/,
|
|
priority: 10,
|
|
chunks: 'all',
|
|
},
|
|
framerMotion: {
|
|
name: 'framer-motion',
|
|
test: /[\\/]node_modules[\\/]framer-motion[\\/]/,
|
|
priority: 10,
|
|
chunks: 'all',
|
|
},
|
|
},
|
|
};
|
|
}
|
|
|
|
return config;
|
|
},
|
|
};
|
|
|
|
module.exports = nextConfig; |