2
0
Files
bot/apps/builder/next.config.js
Baptiste Arnaud 138f3f8b07 🌐 Introduce i18n
Only translate dashboard page for now

Closes #322
2023-03-11 11:05:07 +01:00

49 lines
1.1 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',
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