This commit is contained in:
marko-kraemer 2025-04-23 05:57:41 +01:00
parent 71dece211a
commit 472446c902
1 changed files with 12 additions and 1 deletions

View File

@ -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;