-
Notifications
You must be signed in to change notification settings - Fork 26
/
next.config.mjs
45 lines (40 loc) · 1.09 KB
/
next.config.mjs
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
/** @type {import('next').NextConfig} */
import { withPlausibleProxy } from 'next-plausible'
import { execSync } from 'child_process'
const commitHash = execSync('git log --pretty=format:"%h" -n1')
.toString()
.trim()
import { withSentryConfig } from '@sentry/nextjs'
const nextConfig = {
typescript: {
// !! WARN !!
// Dangerously allow production builds to successfully complete even if
// your project has type errors.
// !! WARN !!
ignoreBuildErrors: true,
},
env: {
COMMIT_HASH: commitHash,
},
images: {
remotePatterns: [
{ protocol: 'https', hostname: 'avatars.slack-edge.com' },
{ protocol: 'https', hostname: '**' },
],
},
}
const sentryContext = {
org: 'malted',
project: 'javascript-nextjs',
silent: !process.env.CI,
widenClientFileUpload: true,
reactComponentAnnotation: {
enabled: true,
},
tunnelRoute: '/monitoring',
hideSourceMaps: true,
disableLogger: true,
automaticVercelMonitors: true,
}
const plausibleConfig = withPlausibleProxy()(nextConfig)
export default withSentryConfig(plausibleConfig, sentryContext)