Spaces:
Build error
Build error
Upload next.config.js with huggingface_hub
Browse files- next.config.js +19 -0
next.config.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/** @type {import('next').NextConfig} */
|
| 2 |
+
const nextConfig = {
|
| 3 |
+
reactStrictMode: true,
|
| 4 |
+
swcMinify: true,
|
| 5 |
+
env: {
|
| 6 |
+
NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8000/api/v1/chat',
|
| 7 |
+
},
|
| 8 |
+
// برای استفاده از API های خارجی
|
| 9 |
+
async rewrites() {
|
| 10 |
+
return [
|
| 11 |
+
{
|
| 12 |
+
source: '/api/v1/chat',
|
| 13 |
+
destination: `${process.env.API_PROXY_URL || 'http://localhost:8000'}/api/v1/chat`,
|
| 14 |
+
},
|
| 15 |
+
];
|
| 16 |
+
},
|
| 17 |
+
};
|
| 18 |
+
|
| 19 |
+
module.exports = nextConfig;
|