26 lines
736 B
JavaScript
26 lines
736 B
JavaScript
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
reactStrictMode: true,
|
|
eslint: { ignoreDuringBuilds: true },
|
|
transpilePackages: ['@coursecraft/shared'],
|
|
// Проксируем /api на бэкенд — в браузере запросы идут на тот же хост, без localhost
|
|
async rewrites() {
|
|
const apiUrl = process.env.API_URL || 'http://127.0.0.1:3125';
|
|
return [{ source: '/api/:path*', destination: `${apiUrl}/api/:path*` }];
|
|
},
|
|
images: {
|
|
remotePatterns: [
|
|
{
|
|
protocol: 'https',
|
|
hostname: '**.supabase.co',
|
|
},
|
|
{
|
|
protocol: 'https',
|
|
hostname: '**.r2.cloudflarestorage.com',
|
|
},
|
|
],
|
|
},
|
|
};
|
|
|
|
module.exports = nextConfig;
|