-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathnext.config.js
More file actions
43 lines (39 loc) · 1.15 KB
/
next.config.js
File metadata and controls
43 lines (39 loc) · 1.15 KB
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
35
36
37
38
39
40
41
42
43
/** @type {import('next').NextConfig} */
const nextConfig = {
turbopack: {},
// Standard Next.js configuration for Vercel deployment
images: {
remotePatterns: [
{
protocol: 'http',
hostname: 'localhost',
},
],
},
// Ensure trailing slashes and better compatibility
trailingSlash: true,
// Also ignore TypeScript errors during build - critical for deployment
typescript: {
ignoreBuildErrors: true,
},
// Optimization for serverless environments (important for Vercel)
poweredByHeader: false,
reactStrictMode: true,
productionBrowserSourceMaps: true, // Enable source maps in production for monitoring
// API proxy configuration to handle CORS issues in local development
async rewrites() {
return [
// Proxy requests to CoinGecko API to avoid CORS issues
{
source: '/api/coingecko/:path*',
destination: 'https://api.coingecko.com/api/v3/:path*',
},
// Alternative API proxy (Coinbase as fallback)
{
source: '/api/coinbase/:path*',
destination: 'https://api.coinbase.com/v2/:path*',
},
];
},
};
module.exports = nextConfig;