/* eslint-disable @typescript-eslint/no-var-requires */ const { withSentryConfig } = require('@sentry/nextjs') const path = require('path') /** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true, output: 'standalone', transpilePackages: [ '@typebot.io/lib', '@typebot.io/schemas', '@typebot.io/emails', ], i18n: { defaultLocale: 'en', locales: ['en', 'fr', 'pr'], }, experimental: { outputFileTracingRoot: path.join(__dirname, '../../'), }, headers: async () => { return [ { source: '/(.*)?', headers: [ { key: 'X-Frame-Options', value: 'SAMEORIGIN', }, ], }, ] }, } const sentryWebpackPluginOptions = { silent: true, release: process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA + '-builder', } module.exports = process.env.NEXT_PUBLIC_SENTRY_DSN ? withSentryConfig( { ...nextConfig, sentry: { hideSourceMaps: true, widenClientFileUpload: true, }, }, sentryWebpackPluginOptions ) : nextConfig