feat(next-config): specify external packages

This commit is contained in:
ItzCrazyKns
2026-04-08 23:18:15 +05:30
parent acaa208a41
commit 65475b418f

View File

@@ -1,3 +1,4 @@
import path from 'node:path';
import pkg from './package.json' with { type: 'json' }; import pkg from './package.json' with { type: 'json' };
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
@@ -10,7 +11,7 @@ const nextConfig = {
}, },
], ],
}, },
serverExternalPackages: ['pdf-parse'], serverExternalPackages: ['pdf-parse', 'playwright', 'officeparser', 'file-type'],
outputFileTracingIncludes: { outputFileTracingIncludes: {
'/api/**': [ '/api/**': [
'./node_modules/@napi-rs/canvas/**', './node_modules/@napi-rs/canvas/**',
@@ -21,6 +22,9 @@ const nextConfig = {
env: { env: {
NEXT_PUBLIC_VERSION: pkg.version, NEXT_PUBLIC_VERSION: pkg.version,
}, },
turbopack: {
root: process.cwd()
}
}; };
export default nextConfig; export default nextConfig;