diff --git a/instrumentation.ts b/instrumentation.ts index 0efc67f..b5e1be1 100644 --- a/instrumentation.ts +++ b/instrumentation.ts @@ -1,7 +1,6 @@ -import { startEmailQueueWorker } from "@/lib/email-queue"; - export async function register() { if (process.env.NEXT_RUNTIME === "nodejs") { + const { startEmailQueueWorker } = await import("@/lib/email-queue"); startEmailQueueWorker(); } } diff --git a/next.config.ts b/next.config.ts index 68a6c64..8bf37ce 100644 --- a/next.config.ts +++ b/next.config.ts @@ -2,6 +2,7 @@ import type { NextConfig } from "next"; const nextConfig: NextConfig = { output: "standalone", + serverExternalPackages: ["nodemailer"], }; export default nextConfig;