-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathnext.config.js
37 lines (33 loc) · 925 Bytes
/
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
const { withSentryConfig } = require('@sentry/nextjs')
const { version } = require('./package.json')
const withPWA = require('next-pwa')({
dest: 'public',
})
const enableSentryWebpackPlugin =
process.env.SENTRY_ENABLE_WEBPACK_PLUGIN === 'true'
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
sentry: {
hideSourceMaps: true,
disableServerWebpackPlugin: !enableSentryWebpackPlugin,
disableClientWebpackPlugin: !enableSentryWebpackPlugin,
},
publicRuntimeConfig: {
version,
},
async redirects() {
return [
{
source: '/',
destination: '/verb/be',
permanent: false,
},
]
},
}
// Make sure adding Sentry options is the last code to run before exporting, to
// ensure that your source maps include changes from all other Webpack plugins
module.exports = withSentryConfig(withPWA(nextConfig), {
silent: true,
})