45 lines
1.0 KiB
JavaScript
45 lines
1.0 KiB
JavaScript
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
const { withSentryConfig } = require('@sentry/nextjs')
|
|
const path = require('path')
|
|
const withTM = require('next-transpile-modules')(['utils', 'models', 'emails'])
|
|
|
|
/** @type {import('next').NextConfig} */
|
|
const nextConfig = withTM({
|
|
reactStrictMode: true,
|
|
output: 'standalone',
|
|
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
|