This commit is contained in:
star7th
2025-07-31 01:44:28 +08:00
parent 3cb25118ab
commit 48bdb5905d
30 changed files with 3192 additions and 33 deletions
+16
View File
@@ -6,6 +6,22 @@ const nextConfig = {
// 在构建过程中忽略ESLint错误
ignoreDuringBuilds: true,
},
webpack: (config, { isServer }) => {
// 处理PDF.js在SSR中的问题
if (isServer) {
config.externals.push({
'pdfjs-dist': 'commonjs pdfjs-dist',
});
}
// 处理canvas模块
config.resolve.fallback = {
...config.resolve.fallback,
canvas: false,
};
return config;
},
/* config options here */
};