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

44 lines
1017 B
JavaScript
Raw Normal View History

const { withSentryConfig } = require('@sentry/nextjs')
2022-08-08 08:21:36 +02:00
const path = require('path')
2022-08-08 08:21:36 +02:00
/** @type {import('next').NextConfig} */
const nextConfig = {
2022-08-08 08:21:36 +02:00
reactStrictMode: true,
transpilePackages: [
'@typebot.io/lib',
'@typebot.io/schemas',
'@typebot.io/emails',
],
2022-08-08 08:21:36 +02:00
output: 'standalone',
experimental: {
2022-08-08 08:21:36 +02:00
outputFileTracingRoot: path.join(__dirname, '../../'),
},
async rewrites() {
return [
{
source: '/api/typebots/:typebotId/blocks/:blockId/storage/upload-url',
destination:
'/api/v1/typebots/:typebotId/blocks/:blockId/storage/upload-url',
},
]
},
}
const sentryWebpackPluginOptions = {
2022-08-08 08:21:36 +02:00
silent: true,
release: process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA + '-viewer',
}
module.exports = process.env.NEXT_PUBLIC_SENTRY_DSN
? withSentryConfig(
{
...nextConfig,
sentry: {
hideSourceMaps: true,
widenClientFileUpload: true,
},
},
sentryWebpackPluginOptions
)
: nextConfig