-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.ts
44 lines (41 loc) · 1.19 KB
/
next.config.ts
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
44
import type { NextConfig } from "next";
import { withSentryConfig } from "@sentry/nextjs";
import createNextIntlPlugin from "next-intl/plugin";
const withNextIntl = createNextIntlPlugin( "./utilities/i18n.ts" );
const nextConfig: NextConfig = withNextIntl( {
serverExternalPackages: [ "pino", "pino-pretty" ], // https://github.com/vercel/next.js/discussions/46987#discussioncomment-8464812
poweredByHeader: false,
experimental: {
serverActions: {
bodySizeLimit: Math.max(
Number( process.env.NEXT_PUBLIC_MAX_QUOTA ),
Number( process.env.NEXT_PUBLIC_MAX_AVATAR_SIZE )
)
}
},
async redirects()
{
return [
{
// Redirection de la page d'accueil des paramètres
// vers l'onglet par défaut du profil utilisateur.
source: "/settings",
permanent: true,
destination: "/settings/user"
}
];
}
} );
const sentryConfig = {
org: process.env.SENTRY_ORG,
silent: true,
project: process.env.SENTRY_PROJECT,
authToken: process.env.SENTRY_AUTH_TOKEN,
tunnelRoute: "/monitoring",
disableLogger: true,
hideSourceMaps: true,
widenClientFileUpload: true
};
export default process.env.SENTRY_ENABLED === "true"
? withSentryConfig( nextConfig, sentryConfig )
: nextConfig;