-
-
Notifications
You must be signed in to change notification settings - Fork 140
Expand file tree
/
Copy pathnext.config.js
More file actions
132 lines (119 loc) · 3.04 KB
/
Copy pathnext.config.js
File metadata and controls
132 lines (119 loc) · 3.04 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
/** @type {import('next').NextConfig} */
const { withSentryConfig } = require('@sentry/nextjs')
const nextConfig = {
reactStrictMode: true,
optimizeFonts: false,
experimental: {
},
sentry: {
// Use `hidden-source-map` rather than `source-map` as the Webpack `devtool`
// for client-side builds. (This will be the default starting in
// `@sentry/nextjs` version 8.0.0.) See
// https://webpack.js.org/configuration/devtool/ and
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#use-hidden-source-map
// for more information.
hideSourceMaps: true,
},
async rewrites() {
const badgeApis = [
'/static',
'/github',
'/gitlab',
'/codeberg',
'/https',
'/memo',
// registry
'/amo',
'/npm',
'/crates',
'/winget',
'/docker',
'/open-vsx',
'/chrome-web-store',
'/edge-addons',
'/vs-marketplace',
'/hackage',
'/ppm',
'/pub',
'/pypi',
'/rubygems',
'/homebrew',
'/nuget',
'/packagist',
'/melpa',
'/maven',
'/cocoapods',
'/haxelib',
'/opam',
'/cpan',
'/cran',
'/ctan',
'/dub',
'/elm-package',
'/scoop',
'/f-droid',
'/shards',
'/wapm',
'/snapcraft',
// analysis
'/bundlephobia',
'/bundlejs',
'/packagephobia',
'/codeclimate',
'/codecov',
'/coveralls',
'/codacy',
'/deepscan',
'/snyk',
'/badgesize',
'/uptime-robot',
'/travis',
'/circleci',
'/appveyor',
'/azure-pipelines',
'/jenkins',
'/dependabot',
'/jsdelivr',
'/xo',
// social network
'/discord',
'/matrix',
'/runkit',
'/peertube',
'/devrant',
'/reddit',
'/mastodon',
'/keybase',
// utilities
'/liberapay',
'/opencollective',
'/tidelift',
'/email',
// discontinued
'/apm',
'/lgtm',
'/david',
'/twitter',
]
let badgeRedirects = [
{ source: '/badge/:path*', destination: '/api/static' },
{ source: '/badge', destination: '/api/static' },
]
badgeRedirects = badgeRedirects
.concat(badgeApis.map(badge => ({ source: `${badge}/:path*`, destination: `/api${badge}` }))) // badges
.concat(badgeApis.map(badge => ({ source: badge, destination: `/api${badge}` }))) // doc pages
return badgeRedirects
},
}
const sentryWebpackPluginOptions = {
// Additional config options for the Sentry Webpack plugin. Keep in mind that
// the following options are set automatically, and overriding them is not
// recommended:
// release, url, org, project, authToken, configFile, stripPrefix,
// urlPrefix, include, ignore
silent: true, // Suppresses all logs
dryRun: process.env.VERCEL_ENV !== "production"
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options.
}
module.exports = withSentryConfig(nextConfig, sentryWebpackPluginOptions)