mirror of https://github.com/kortix-ai/suna.git
33 lines
835 B
TypeScript
33 lines
835 B
TypeScript
import { withSentryConfig } from '@sentry/nextjs';
|
|
import type { NextConfig } from 'next';
|
|
|
|
let nextConfig: NextConfig = {
|
|
webpack: (config) => {
|
|
// This rule prevents issues with pdf.js and canvas
|
|
config.externals = [...(config.externals || []), { canvas: 'canvas' }];
|
|
|
|
// Ensure node native modules are ignored
|
|
config.resolve.fallback = {
|
|
...config.resolve.fallback,
|
|
canvas: false,
|
|
};
|
|
|
|
return config;
|
|
},
|
|
};
|
|
|
|
/** Removing Sentry for now */
|
|
if (false && process.env.NEXT_PUBLIC_VERCEL_ENV === 'production') {
|
|
nextConfig = withSentryConfig(nextConfig, {
|
|
org: 'kortix-ai',
|
|
project: 'suna-nextjs',
|
|
silent: !process.env.CI,
|
|
widenClientFileUpload: true,
|
|
tunnelRoute: '/monitoring',
|
|
disableLogger: true,
|
|
automaticVercelMonitors: true,
|
|
});
|
|
}
|
|
|
|
export default nextConfig;
|