2026-06-20 12:37:38 +03:30
|
|
|
import type { NextConfig } from 'next';
|
2026-08-31 07:34:07 +03:30
|
|
|
import { withSentryConfig } from '@sentry/nextjs';
|
2026-06-20 12:37:38 +03:30
|
|
|
import createNextIntlPlugin from 'next-intl/plugin';
|
|
|
|
|
|
|
|
|
|
const withNextIntl = createNextIntlPlugin('./src/i18n/request.ts');
|
2026-04-23 15:33:11 +03:30
|
|
|
|
2026-05-03 20:15:39 +03:30
|
|
|
function publicAppHostname(): string | null {
|
|
|
|
|
const url = process.env.NEXT_PUBLIC_APP_URL;
|
|
|
|
|
if (!url) return null;
|
|
|
|
|
try {
|
|
|
|
|
return new URL(url).hostname;
|
|
|
|
|
} catch {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const appHost = publicAppHostname();
|
|
|
|
|
|
2026-06-20 12:37:38 +03:30
|
|
|
const nextConfig: NextConfig = {
|
2026-04-23 15:33:11 +03:30
|
|
|
reactStrictMode: true,
|
|
|
|
|
poweredByHeader: false,
|
|
|
|
|
images: {
|
2026-05-03 20:15:39 +03:30
|
|
|
remotePatterns: [
|
2026-06-20 12:37:38 +03:30
|
|
|
{ protocol: 'http', hostname: 'localhost' },
|
2026-05-03 20:15:39 +03:30
|
|
|
...(appHost
|
|
|
|
|
? [
|
2026-06-20 12:37:38 +03:30
|
|
|
{ protocol: 'http' as const, hostname: appHost },
|
|
|
|
|
{ protocol: 'https' as const, hostname: appHost },
|
2026-05-03 20:15:39 +03:30
|
|
|
]
|
|
|
|
|
: []),
|
2026-06-20 12:37:38 +03:30
|
|
|
{ protocol: 'https', hostname: 'dyolink.com' },
|
|
|
|
|
{ protocol: 'https', hostname: 'www.dyolink.com' },
|
2026-05-03 20:15:39 +03:30
|
|
|
],
|
2026-04-23 15:33:11 +03:30
|
|
|
},
|
|
|
|
|
env: {
|
|
|
|
|
NEXT_PUBLIC_APP_NAME: process.env.NEXT_PUBLIC_APP_NAME,
|
|
|
|
|
NEXT_PUBLIC_APP_URL: process.env.NEXT_PUBLIC_APP_URL,
|
|
|
|
|
NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL,
|
2026-08-31 07:34:07 +03:30
|
|
|
NEXT_PUBLIC_SENTRY_DSN: process.env.NEXT_PUBLIC_SENTRY_DSN,
|
|
|
|
|
NEXT_PUBLIC_SENTRY_ENVIRONMENT: process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT,
|
2026-04-23 15:33:11 +03:30
|
|
|
},
|
2026-06-20 12:37:38 +03:30
|
|
|
output: 'standalone',
|
2026-04-23 15:33:11 +03:30
|
|
|
compress: true,
|
2026-06-20 12:37:38 +03:30
|
|
|
};
|
2026-04-23 15:33:11 +03:30
|
|
|
|
2026-08-31 07:34:07 +03:30
|
|
|
export default withSentryConfig(withNextIntl(nextConfig), {
|
|
|
|
|
silent: true,
|
|
|
|
|
sourcemaps: { disable: true },
|
|
|
|
|
disableLogger: true,
|
|
|
|
|
});
|