Spaces:
Running
Running
File size: 1,182 Bytes
ff0e173 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | import type { NextConfig } from "next";
const nextConfig: NextConfig = {
// Emit a self-contained server bundle (.next/standalone) so the Docker
// image used by the Hugging Face Space stays small and runs with `node server.js`.
output: 'standalone',
// Pin the workspace root to this project. A stray lockfile higher up the
// drive (E:\pnpm-lock.yaml) otherwise makes Next infer E:\ as the root and
// nest the standalone output under a query-bot/ subdir, breaking the image.
outputFileTracingRoot: __dirname,
turbopack: {
root: __dirname,
},
transpilePackages: ['motion'],
// Keep these Node-only parsers/SDK out of the server bundle so their
// dynamic requires (pdf.js worker, native bits) resolve at runtime.
serverExternalPackages: ['pdf-parse', 'mammoth', 'xlsx', 'cohere-ai'],
// Allow the brand file-type icons served from icons8 to flow through
// the next/image optimizer. The query string carries the icon id, so
// `search` is omitted to permit it.
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'img.icons8.com',
pathname: '/**',
},
],
},
};
export default nextConfig;
|