-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
32 lines (30 loc) · 875 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
require('dotenv').config();
const withOffline = require('next-offline');
const nextConfig = {
generateInDevMode: true,
workboxOpts: {
maximumFileSizeToCacheInBytes: 20000000,
swDest: process.env.NEXT_EXPORT
? 'service-worker.js'
: 'static/service-worker.js',
runtimeCaching: [
{
urlPattern: /.*(?:googleapis)\.com.*$/,
handler: 'CacheFirst',
},
{
urlPattern: /\.(?:png|jpg|jpeg|svg|css)$/,
handler: 'CacheFirst',
},
],
},
env: {
APOLLO_URL: process.env.APOLLO_URL,
LINE_CLIENT_KEY: process.env.LINE_CLIENT_KEY,
LINE_SECRET_KEY: process.env.LINE_SECRET_KEY,
LINE_REDIRECT_URI: process.env.LINE_REDIRECT_URI,
LINE_REDIRECT_LINK: process.env.LINE_REDIRECT_LINK,
OMISE_PUBLIC_KEY: process.env.OMISE_PUBLIC_KEY,
},
};
module.exports = withOffline(nextConfig);