-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnext.config.js
More file actions
35 lines (32 loc) · 852 Bytes
/
next.config.js
File metadata and controls
35 lines (32 loc) · 852 Bytes
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
/* eslint-disable @typescript-eslint/no-var-requires */
/** @type {import('next').NextConfig} */
const nextConfig = {
optimizeFonts: false,
images: {
domains: ['www.janog.gr.jp'],
},
}
const isDev = process.env.NODE_ENV !== 'production'
const withPWA = require('next-pwa')({
dest: 'public',
swSrc: 'src/service-worker.js',
// https://github.com/shadowwalker/next-pwa/issues/424#issuecomment-1857499715
exclude: [
// add buildExcludes here
({ asset }) => {
if (
asset.name.startsWith('server/') ||
asset.name.match(
/^((app-|^)build-manifest\.json|react-loadable-manifest\.json)$/
)
) {
return true
}
if (isDev && !asset.name.startsWith('static/runtime/')) {
return true
}
return false
},
],
})
module.exports = withPWA(nextConfig)