| 1 | import { fileURLToPath } from 'node:url' |
| 2 | import bundleAnalyzer from '@next/bundle-analyzer |
| 3 | import type { NextConfig |
| 4 | |
| 5 | async function createNextConfig() |
| 6 | const { createJiti |
| 7 | const jiti = |
| 8 | if (process.env |
| 9 | await jiti.import |
| 10 | } |
| 11 | |
| 12 | const nextConfig: |
| 13 | reactStrictMode: true, |
| 14 | productionBrowserSourceMaps: process.env |
| 15 | logging: { |
| 16 | fetches: { |
| 17 | fullUrl: true, |
| 18 | }, |
| 19 | }, |
| 20 | typescript: { |
| 21 | ignoreBuildErrors: true, |
| 22 | }, |
| 23 | typedRoutes: true, |
| 24 | headers: async () |
| 25 | { |
| 26 | source: '/(.*)', |
| 27 | headers: [ |
| 28 | { |
| 29 | key: 'X-Content-Type-Options', |
| 30 | value: 'nosniff', |
| 31 | }, |
| 32 | { |
| 33 | key: 'Content-Security-Policy', |
| 34 | value: "frame-ancestors 'self';", |
| 35 | }, |
| 36 | { |
| 37 | key: 'X-Frame-Options', |
| 38 | value: 'SAMEORIGIN', |
| 39 | }, |
| 40 | ], |
| 41 | }, |
| 42 | ], |
| 43 | } |
| 44 | |
| 45 | return nextConfig |
| 46 | } |
| 47 | |
| 48 | const bundleAnalyzerPlugin = bundleAnalyzer |
| 49 | enabled: process.env |
| 50 | }) |
| 51 | |
| 52 | const NextApp = async |
| 53 | const nextConfig = |
| 54 | const plugins = |
| 55 | return plugins.reduce |
| 56 | } |
| 57 | |
| 58 | export default NextApp |