From 472446c9027763046f6ed43e166a2a1f6238965f Mon Sep 17 00:00:00 2001 From: marko-kraemer Date: Wed, 23 Apr 2025 05:57:41 +0100 Subject: [PATCH] wip --- frontend/next.config.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/frontend/next.config.ts b/frontend/next.config.ts index 3d8b6021..c72f1376 100644 --- a/frontend/next.config.ts +++ b/frontend/next.config.ts @@ -1,7 +1,18 @@ import type { NextConfig } from "next"; const 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; + }, }; export default nextConfig;