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