forked from frosty720/frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
35 lines (33 loc) · 976 Bytes
/
next.config.js
File metadata and controls
35 lines (33 loc) · 976 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
typescript: {
// TypeScript errors fixed - fail build on type errors for safety
ignoreBuildErrors: false,
},
async rewrites() {
// Only use rewrites in development
if (process.env.NODE_ENV === 'development') {
return [
{
source: '/api/:path*',
destination: 'https://api.kalyswap.localhost/api/:path*', // Proxy to backend (via portless)
},
{
source: '/subgraphs/:path*',
destination: 'https://app.kalyswap.io/subgraphs/:path*', // Proxy subgraph to avoid CORS
},
];
}
return [];
},
webpack: (config) => {
// Fix for MetaMask SDK trying to import React Native modules in browser
config.resolve.fallback = {
...config.resolve.fallback,
'@react-native-async-storage/async-storage': false,
};
return config;
},
};
module.exports = nextConfig;