import type { NextConfig } from "next"; const nextConfig: NextConfig = { // @microsoft/signalr does dynamic require('ws')/require('eventsource') for // its Node transports — bundling it (turbopack production builds) throws // "dynamic usage of require is not supported" the moment a hub is built. // undici and ws stay external for the same reason as signalr: the proxy // module (lib/outbound-proxy.ts) needs the real Node packages, not a bundle. serverExternalPackages: ['better-sqlite3', '@microsoft/signalr', 'undici', 'ws'], }; export default nextConfig;