2
0
Files
bot/apps/builder/next.config.js

45 lines
1.0 KiB
JavaScript
Raw Normal View History

/* 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')
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} */
const nextConfig = withTM({
2022-08-08 08:21:36 +02:00
reactStrictMode: true,
output: 'standalone',
experimental: {
2022-08-08 08:21:36 +02:00
outputFileTracingRoot: path.join(__dirname, '../../'),
},
headers: async () => {
return [
{
source: '/(.*)?',
headers: [
{
key: 'X-Frame-Options',
2023-02-13 18:30:29 +01:00
value: 'SAMEORIGIN',
},
],
},
]
},
})
2022-02-14 10:57:57 +01:00
const sentryWebpackPluginOptions = {
silent: true,
release: process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA + '-builder',
2022-02-14 10:57:57 +01:00
}
module.exports = process.env.NEXT_PUBLIC_SENTRY_DSN
? withSentryConfig(
{
...nextConfig,
sentry: {
hideSourceMaps: true,
widenClientFileUpload: true,
},
},
sentryWebpackPluginOptions
)
: nextConfig