import type { NextConfig } from 'next'; const securityHeaders = [ { key: 'X-Frame-Options', value: 'DENY', }, { key: 'X-Content-Type-Options', value: 'nosniff', }, { key: 'X-XSS-Protection', value: '1; mode=block', }, { key: 'Referrer-Policy', value: 'strict-origin-when-cross-origin', }, ]; const nextConfig: NextConfig = { ...(process.env.VERCEL ? {} : { output: 'standalone' }), async headers() { return [ { source: '/(.*)', headers: securityHeaders, }, ]; }, webpack: config => { // Handle file: references for @bytelyst packages // eslint-disable-next-line @typescript-eslint/no-var-requires const path = require('path'); config.resolve.alias = { ...config.resolve.alias, '@bytelyst/api-client': path.resolve( __dirname, '../../learning_ai_common_plat/packages/api-client/dist/index.js' ), '@bytelyst/errors': path.resolve( __dirname, '../../learning_ai_common_plat/packages/errors/dist/index.js' ), }; return config; }, }; export default nextConfig;