forked from tfkhdyt/yukitanya
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.mjs
45 lines (39 loc) · 930 Bytes
/
next.config.mjs
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
/**
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful
* for Docker builds.
*/
import withPWAInit from '@ducanh2912/next-pwa';
await import('./src/environment.mjs');
// const withBundleAnalyzer = bundleAnalyzer({
// enabled: process.env.ANALYZE === 'true',
// });
const withPWA = withPWAInit({
dest: 'public',
cacheOnFrontEndNav: true,
aggressiveFrontEndNavCaching: true,
reloadOnOnline: true,
fallbacks: {
document: '/offline',
},
workboxOptions: {
disableDevLogs: true,
},
});
// const withSerwist = withSerwistInit({
// cacheOnFrontEndNav: true,
// swSrc: 'src/app/sw.ts',
// swDest: 'public/sw.js',
// disable: process.env.NODE_ENV === 'development',
// });
/** @type {import("next").NextConfig} */
const config = {
reactStrictMode: true,
images: {
remotePatterns: [
{
hostname: 'utfs.io',
},
],
},
};
export default withPWA(config);