|
|
| import type { NextConfig } from 'next'
|
| import bundleAnalyzer from '@next/bundle-analyzer'
|
|
|
| const withBundleAnalyzer = bundleAnalyzer({
|
| enabled: process.env['ANALYZE'] === 'true',
|
| })
|
|
|
| const nextConfig: NextConfig = {
|
| images: {
|
| remotePatterns: [
|
| {
|
| protocol: 'https',
|
| hostname: 'images.unsplash.com',
|
| },
|
| {
|
| protocol: 'https',
|
| hostname: 'www.lmdpro.com',
|
| },
|
| {
|
| protocol: 'https',
|
| hostname: 'lmdpro.com',
|
| },
|
| {
|
| protocol: 'https',
|
| hostname: 'lh3.googleusercontent.com',
|
| }
|
| ],
|
| formats: ['image/avif', 'image/webp'],
|
| minimumCacheTTL: 3600,
|
| },
|
|
|
| poweredByHeader: false,
|
| compress: true,
|
| generateEtags: true,
|
|
|
|
|
| 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',
|
| },
|
| {
|
| key: 'Permissions-Policy',
|
| value: 'camera=(), microphone=(), geolocation=()',
|
| },
|
| ],
|
| },
|
| {
|
| source: '/api/(.*)',
|
| headers: [
|
| {
|
| key: 'Cache-Control',
|
| value: 'no-store, max-age=0',
|
| },
|
| ],
|
| },
|
| ];
|
| },
|
|
|
|
|
| async redirects() {
|
| return [
|
| {
|
| source: '/home',
|
| destination: '/',
|
| permanent: true,
|
| },
|
| ];
|
| },
|
|
|
|
|
| typescript: {
|
| ignoreBuildErrors: process.env.NODE_ENV === 'development',
|
| },
|
| eslint: {
|
| ignoreDuringBuilds: process.env.NODE_ENV === 'development',
|
| },
|
|
|
|
|
| experimental: {
|
| optimizeCss: true,
|
| scrollRestoration: true,
|
| },
|
|
|
|
|
| turbopack: {
|
| rules: {
|
| '*.svg': {
|
| loaders: ['@svgr/webpack'],
|
| as: '*.js',
|
| },
|
| },
|
| },
|
|
|
|
|
| serverExternalPackages: ['@genkit-ai/googleai', 'genkit'],
|
|
|
|
|
| webpack: (config, { isServer }) => {
|
| if (!isServer) {
|
| config.resolve.fallback = {
|
| fs: false,
|
| net: false,
|
| tls: false,
|
| };
|
| }
|
| return config;
|
| },
|
|
|
|
|
| compiler: {
|
| removeConsole: process.env['NODE_ENV'] === 'production',
|
| },
|
|
|
|
|
|
|
| };
|
|
|
| export default withBundleAnalyzer(nextConfig);
|
|
|