Files
dyolink/frontend/next.config.ts
rameen 50eda34e8e
Some checks failed
Production — tag build, push, deploy / build-and-push (push) Successful in 1h13m36s
Production — tag build, push, deploy / deploy (push) Failing after 1m1s
The app is now wired to GlitchTip with the Sentry SDKs
2026-08-31 07:34:07 +03:30

51 lines
1.4 KiB
TypeScript

import type { NextConfig } from 'next';
import { withSentryConfig } from '@sentry/nextjs';
import createNextIntlPlugin from 'next-intl/plugin';
const withNextIntl = createNextIntlPlugin('./src/i18n/request.ts');
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();
const nextConfig: NextConfig = {
reactStrictMode: true,
poweredByHeader: false,
images: {
remotePatterns: [
{ protocol: 'http', hostname: 'localhost' },
...(appHost
? [
{ protocol: 'http' as const, hostname: appHost },
{ protocol: 'https' as const, hostname: appHost },
]
: []),
{ protocol: 'https', hostname: 'dyolink.com' },
{ protocol: 'https', hostname: 'www.dyolink.com' },
],
},
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,
NEXT_PUBLIC_SENTRY_DSN: process.env.NEXT_PUBLIC_SENTRY_DSN,
NEXT_PUBLIC_SENTRY_ENVIRONMENT: process.env.NEXT_PUBLIC_SENTRY_ENVIRONMENT,
},
output: 'standalone',
compress: true,
};
export default withSentryConfig(withNextIntl(nextConfig), {
silent: true,
sourcemaps: { disable: true },
disableLogger: true,
});