trade-frontend/next.config.js

55 lines
939 B
JavaScript
Raw Permalink Normal View History

2025-06-02 11:40:07 +05:00
/** @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',
],
2025-06-02 11:40:07 +05:00
async redirects() {
return [
{
2025-09-14 18:31:52 +07:00
source: '/',
destination: '/dex',
2025-06-02 11:40:07 +05:00
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'],
2025-06-02 11:40:07 +05:00
});
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;