/** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true, transpilePackages: [ 'antd', 'rc-util', 'rc-pagination', 'rc-picker', 'rc-input', 'rc-table', 'rc-select', 'rc-tree', 'rc-dropdown', 'rc-menu', 'rc-tabs', 'rc-tooltip', 'rc-notification', '@ant-design/icons', '@ant-design/cssinjs', ], async redirects() { return [ { source: '/', destination: '/dex', permanent: false, }, ]; }, webpack: (config) => { config.module.rules.push({ test: /\.svg$/i, resourceQuery: /url/, type: 'asset/resource', }); config.module.rules.push({ test: /\.svg$/i, issuer: /\.[jt]sx?$/, resourceQuery: { not: [/url/] }, use: ['@svgr/webpack'], }); return config; }, async rewrites() { return [ { source: '/api/:path*', destination: `${process.env.NEXT_PUBLIC_API_URL}/api/:path*`, }, ]; }, }; export default nextConfig;