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