Spaces:
Build error
Build error
Mehdi commited on
Upload next.config.js with huggingface_hub
Browse files- next.config.js +7 -22
next.config.js
CHANGED
|
@@ -1,30 +1,15 @@
|
|
| 1 |
/** @type {import('next').NextConfig} */
|
| 2 |
const nextConfig = {
|
| 3 |
reactStrictMode: true,
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
unoptimized: true
|
| 9 |
-
},
|
| 10 |
-
env: {
|
| 11 |
-
NEXT_PUBLIC_APP_VERSION: process.env.npm_package_version,
|
| 12 |
},
|
| 13 |
webpack: (config) => {
|
| 14 |
-
config.
|
| 15 |
-
'utf-8-validate': 'commonjs utf-8-validate',
|
| 16 |
-
'bufferutil': 'commonjs bufferutil',
|
| 17 |
-
});
|
| 18 |
return config;
|
| 19 |
},
|
| 20 |
-
|
| 21 |
-
return [
|
| 22 |
-
{
|
| 23 |
-
source: '/api/:path*',
|
| 24 |
-
destination: 'http://localhost:3001/api/:path*',
|
| 25 |
-
},
|
| 26 |
-
];
|
| 27 |
-
},
|
| 28 |
-
};
|
| 29 |
|
| 30 |
-
module.exports = nextConfig
|
|
|
|
| 1 |
/** @type {import('next').NextConfig} */
|
| 2 |
const nextConfig = {
|
| 3 |
reactStrictMode: true,
|
| 4 |
+
i18n: {
|
| 5 |
+
locales: ['fa', 'en'],
|
| 6 |
+
defaultLocale: 'fa',
|
| 7 |
+
localeDetection: false,
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
},
|
| 9 |
webpack: (config) => {
|
| 10 |
+
config.resolve.fallback = { fs: false, net: false, tls: false };
|
|
|
|
|
|
|
|
|
|
| 11 |
return config;
|
| 12 |
},
|
| 13 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
+
module.exports = nextConfig
|