-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
next.config.js
56 lines (54 loc) · 1.37 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
45
46
47
48
49
50
51
52
53
54
55
56
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
openAnalyzer: false,
});
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
output: 'standalone',
serverExternalPackages: ['@airbrake/node'],
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'www.gravatar.com',
},
{
protocol: 'https',
hostname: 'i.imgur.com',
},
],
},
devIndicators: {
buildActivityPosition: 'bottom-right',
},
logging: {
level: process.env.AIRBROKE_LOG_LEVEL === 'verbose' ? 'verbose' : undefined,
},
async rewrites() {
return [
{
source: '/api/v3/projects/:project_id/create-notice',
destination: '/api/v3/notices',
},
{
source: '/api/v3/projects/:project_id/notices',
destination: '/api/v3/notices',
},
{
source: '/notifier_api/v2/notices',
destination: '/api/v3/notices',
},
// old api routing compat
{
source: '/projects/:project_id/notices/:notice_id/occurrences/:occurrence_id',
destination: '/occurrences/:occurrence_id',
},
{
source: '/projects/:project_id/notices/:notice_id',
destination: '/notices/:notice_id',
},
];
},
};
module.exports = withBundleAnalyzer(nextConfig);