-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
33 lines (29 loc) · 1.01 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
const dotenv = require('dotenv')
const withPWA = require('next-pwa')
dotenv.config()
const isDev = process.env.NODE_ENV !== 'production'
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true'
})
module.exports = withPWA(
withBundleAnalyzer({
env: {
AUTH0_DOMAIN: process.env.AUTH0_DOMAIN,
AUTH0_CLIENT_ID: process.env.AUTH0_CLIENT_ID,
AUTH0_CLIENT_SECRET: process.env.AUTH0_CLIENT_SECRET,
AUTH0_SCOPE: 'openid profile',
REDIRECT_URI: isDev
? 'http://localhost:3000/api/auth/callback'
: process.env.REDIRECT_URI,
POST_LOGOUT_REDIRECT_URI: isDev
? 'http://localhost:3000'
: process.env.POST_LOGOUT_REDIRECT_URI,
SESSION_COOKIE_SECRET: process.env.SESSION_COOKIE_SECRET,
SESSION_COOKIE_LIFETIME: 7200 // 2 hours
},
pwa: {
dest: 'public'
},
target: 'serverless'
})
)