/** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true, swcMinify: true, output: 'standalone', experimental: { serverActions: { allowedOrigins: ['telegram.org', 't.me', 'kubek.campfiregg.ru'], }, }, webpack: (config) => { config.externals.push({ 'utf-8-validate': 'commonjs utf-8-validate', 'bufferutil': 'commonjs bufferutil', }); return config; }, images: { domains: ['t.me', 'telegram.org', 'kubek.campfiregg.ru'], }, async headers() { return [ { source: '/:path*', headers: [ { key: 'Access-Control-Allow-Origin', value: '*', }, { key: 'Content-Security-Policy', value: "default-src 'self' telegram.org *.telegram.org t.me kubek.campfiregg.ru data: 'unsafe-inline' 'unsafe-eval';" } ], }, ]; }, typescript: { ignoreBuildErrors: true, }, poweredByHeader: false, compress: true, productionBrowserSourceMaps: false, basePath: '', assetPrefix: process.env.NODE_ENV === 'production' ? 'https://kubek.campfiregg.ru' : '' } module.exports = nextConfig