suna/frontend/next.config.ts

32 lines
795 B
TypeScript
Raw Normal View History

import { withSentryConfig } from '@sentry/nextjs';
import type { NextConfig } from 'next';
2025-04-16 01:20:15 +08:00
let nextConfig: NextConfig = {
2025-04-23 12:57:41 +08:00
webpack: (config) => {
// This rule prevents issues with pdf.js and canvas
config.externals = [...(config.externals || []), { canvas: 'canvas' }];
2025-04-23 12:57:41 +08:00
// Ensure node native modules are ignored
config.resolve.fallback = {
...config.resolve.fallback,
canvas: false,
};
2025-04-23 12:57:41 +08:00
return config;
},
2025-04-16 01:20:15 +08:00
};
if (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,
});
}
2025-04-16 01:20:15 +08:00
export default nextConfig;