2023-02-21 15:25:14 +01:00
|
|
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
2022-02-14 10:57:57 +01:00
|
|
|
const { withSentryConfig } = require('@sentry/nextjs')
|
2022-08-08 08:21:36 +02:00
|
|
|
const path = require('path')
|
2023-02-21 15:25:14 +01:00
|
|
|
const withTM = require('next-transpile-modules')(['utils', 'models', 'emails'])
|
2022-02-14 10:57:57 +01:00
|
|
|
|
2022-08-08 08:21:36 +02:00
|
|
|
/** @type {import('next').NextConfig} */
|
2022-12-20 10:05:30 +01:00
|
|
|
const nextConfig = withTM({
|
2022-08-08 08:21:36 +02:00
|
|
|
reactStrictMode: true,
|
|
|
|
output: 'standalone',
|
2022-03-12 07:53:37 +01:00
|
|
|
experimental: {
|
2022-08-08 08:21:36 +02:00
|
|
|
outputFileTracingRoot: path.join(__dirname, '../../'),
|
2022-03-12 07:53:37 +01:00
|
|
|
},
|
2023-01-18 20:56:48 +01:00
|
|
|
headers: async () => {
|
|
|
|
return [
|
|
|
|
{
|
|
|
|
source: '/(.*)?',
|
|
|
|
headers: [
|
|
|
|
{
|
|
|
|
key: 'X-Frame-Options',
|
2023-02-13 18:30:29 +01:00
|
|
|
value: 'SAMEORIGIN',
|
2023-01-18 20:56:48 +01:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
]
|
|
|
|
},
|
2022-12-20 10:05:30 +01:00
|
|
|
})
|
2022-02-14 10:57:57 +01:00
|
|
|
|
|
|
|
const sentryWebpackPluginOptions = {
|
|
|
|
silent: true,
|
2023-02-06 09:48:48 +01:00
|
|
|
release: process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA + '-builder',
|
2022-02-14 10:57:57 +01:00
|
|
|
}
|
|
|
|
|
2022-12-20 10:05:30 +01:00
|
|
|
module.exports = process.env.NEXT_PUBLIC_SENTRY_DSN
|
|
|
|
? withSentryConfig(
|
|
|
|
{
|
|
|
|
...nextConfig,
|
|
|
|
sentry: {
|
|
|
|
hideSourceMaps: true,
|
2023-02-14 15:09:05 +01:00
|
|
|
widenClientFileUpload: true,
|
2022-12-20 10:05:30 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
sentryWebpackPluginOptions
|
|
|
|
)
|
|
|
|
: nextConfig
|