generated from lertsoft/typescript_nextjs_template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
37 lines (33 loc) · 949 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
/* eslint-disable import/no-extraneous-dependencies */
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
});
module.exports = withBundleAnalyzer({
eslint: {
dirs: ['.'],
},
poweredByHeader: false,
trailingSlash: true,
basePath: '',
// The starter code load resources from `public` folder with `router.basePath` in React components.
// So, the source code is "basePath-ready".
// You can remove `basePath` if you don't need it.
reactStrictMode: true,
});
// const withPWA = require('next-pwa');
const withPWA = require('next-pwa')({
dest: 'public',
// disable: process.env.NODE_ENV === 'development',
register: true,
// scope: '/app',
// sw: 'service-worker.js',
});
module.exports = withPWA({
// ...before
// pwa: {
// dest: 'public',
// register: true,
// skipWaiting: true,
// disable: process.env.NODE_ENV === 'development',
// },
});