fix: resolve webpack build error for nodemailer in Docker
- next.config.ts: serverExternalPackages für nodemailer hinzugefügt - instrumentation.ts: statischen Import durch dynamischen ersetzt, damit Webpack email-queue.ts (und damit nodemailer) nicht im Edge-Bundle analysiert Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
9e56f1b5a3
commit
ad0c7adc27
|
|
@ -1,7 +1,6 @@
|
||||||
import { startEmailQueueWorker } from "@/lib/email-queue";
|
|
||||||
|
|
||||||
export async function register() {
|
export async function register() {
|
||||||
if (process.env.NEXT_RUNTIME === "nodejs") {
|
if (process.env.NEXT_RUNTIME === "nodejs") {
|
||||||
|
const { startEmailQueueWorker } = await import("@/lib/email-queue");
|
||||||
startEmailQueueWorker();
|
startEmailQueueWorker();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import type { NextConfig } from "next";
|
||||||
|
|
||||||
const nextConfig: NextConfig = {
|
const nextConfig: NextConfig = {
|
||||||
output: "standalone",
|
output: "standalone",
|
||||||
|
serverExternalPackages: ["nodemailer"],
|
||||||
};
|
};
|
||||||
|
|
||||||
export default nextConfig;
|
export default nextConfig;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue