47 lines
889 B
JavaScript
47 lines
889 B
JavaScript
const { withSentryConfig } = require('@sentry/nextjs')
|
|
const path = require('path')
|
|
const withTM = require('next-transpile-modules')([
|
|
'utils',
|
|
'models',
|
|
'emails',
|
|
'bot-engine',
|
|
])
|
|
|
|
/** @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: 'DENY',
|
|
},
|
|
],
|
|
},
|
|
]
|
|
},
|
|
})
|
|
|
|
const sentryWebpackPluginOptions = {
|
|
silent: true,
|
|
}
|
|
|
|
module.exports = process.env.NEXT_PUBLIC_SENTRY_DSN
|
|
? withSentryConfig(
|
|
{
|
|
...nextConfig,
|
|
sentry: {
|
|
hideSourceMaps: true,
|
|
},
|
|
},
|
|
sentryWebpackPluginOptions
|
|
)
|
|
: nextConfig
|