-
Notifications
You must be signed in to change notification settings - Fork 1
/
next.config.js
44 lines (40 loc) 路 1.01 KB
/
next.config.js
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
// @ts-check
/**
* @type {import("next").NextConfig}
*/
const { withSentryConfig } = require( "@sentry/nextjs" );
const withNextIntl = require( "next-intl/plugin" )( "./utilities/i18n.ts" );
const nextConfig = withNextIntl( {
poweredByHeader: false,
experimental: {
// https://github.com/vercel/next.js/discussions/46987#discussioncomment-8464812
serverComponentsExternalPackages: ["pino", "pino-pretty"]
},
basePath: "",
sentry: {
tunnelRoute: "/monitoring",
disableLogger: true,
hideSourceMaps: true,
widenClientFileUpload: true
},
async redirects()
{
return [
{
// Redirection vers l'ancienne version.
source: "/legacy",
permanent: true,
destination: "https://legacy.florian-dev.fr/portfolio/"
}
];
}
} );
const sentryConfig = {
org: process.env.SENTRY_ORG,
silent: true,
project: process.env.SENTRY_PROJECT,
authToken: process.env.SENTRY_AUTH_TOKEN
};
module.exports = process.env.SENTRY_ENABLED === "true"
? withSentryConfig( nextConfig, sentryConfig )
: nextConfig;