Spaces:
Sleeping
Sleeping
| 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; | |