-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
next.config.js
52 lines (51 loc) · 1.11 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
/* eslint-disable @typescript-eslint/no-var-requires */
const { withSentryConfig } = require('@sentry/nextjs')
const withPWA = require('next-pwa')({
disable: process.env.NODE_ENV !== 'production',
register: false,
})
const VERSION = require('./package.json').version
/**
* @type {import('next').NextConfig}
*/
const NextConfig = {
webpack: (config, { isServer }) => {
if (!isServer) {
config.resolve.fallback.fs = false
}
return config
},
env: {
NEXT_PUBLIC_RELEASE_VERSION: VERSION,
SENTRY_SKIP_AUTO_RELEASE: 'true',
},
experimental: {
instrumentationHook: true,
scrollRestoration: true,
},
swcMinify: true,
redirects: async () => {
return [
{
source: '/developers',
destination: '/developers/applications',
permanent: true,
},
{
source: '/developers/docs',
destination: '/developers/docs/시작하기',
permanent: true,
},
]
},
sentry: process.env.CI
? {
disableServerWebpackPlugin: true,
disableClientWebpackPlugin: true,
hideSourceMaps: true,
}
: {
hideSourceMaps: true,
},
}
module.exports = withSentryConfig(withPWA(NextConfig))