trade-frontend/next.config.js

37 lines
677 B
JavaScript
Raw Normal View History

2025-06-02 11:40:07 +05:00
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
async redirects() {
return [
2025-09-14 17:32:48 +07:00
// {
// source: '/',
// destination: '/dex',
// permanent: false,
// },
2025-06-02 11:40:07 +05:00
{
2025-09-14 17:32:48 +07:00
source: '/((?!maintenance).*)', // Match everything except "/maintenance"
destination: '/maintenance',
2025-06-02 11:40:07 +05:00
permanent: false,
},
];
},
webpack: (config) => {
config.module.rules.push({
test: /\.svg$/,
use: ['@svgr/webpack', 'url-loader'],
});
return config;
},
async rewrites() {
return [
{
source: '/api/:path*',
2025-07-05 18:17:12 +07:00
destination: `${process.env.NEXT_PUBLIC_API_URL}/api/:path*`,
2025-07-01 19:04:53 +07:00
},
];
2025-06-02 11:40:07 +05:00
},
};
export default nextConfig;