Spaces:
Sleeping
Sleeping
| /** @type {import('next').NextConfig} */ | |
| const nextConfig = { | |
| reactStrictMode: true, | |
| // Avoid incorrect workspace-root inference when unrelated lockfiles exist higher up the filesystem. | |
| // Ensures output file tracing uses this project root for production builds. | |
| outputFileTracingRoot: __dirname, | |
| output: 'standalone', | |
| async rewrites() { | |
| return [ | |
| { | |
| source: '/api/:path*', | |
| destination: 'http://127.0.0.1:8000/:path*', // Proxy to Backend | |
| }, | |
| { | |
| source: '/docs', | |
| destination: 'http://127.0.0.1:8000/docs', // Proxy to Swagger UI | |
| }, | |
| { | |
| source: '/openapi.json', | |
| destination: 'http://127.0.0.1:8000/openapi.json', // Proxy to OpenAPI spec | |
| }, | |
| ] | |
| }, | |
| webpack: (config) => { | |
| config.resolve.fallback = { | |
| ...config.resolve.fallback, | |
| fs: false, | |
| net: false, | |
| tls: false, | |
| }; | |
| return config; | |
| }, | |
| }; | |
| module.exports = nextConfig; | |