-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.mjs
48 lines (45 loc) · 1.07 KB
/
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
46
47
48
import withPWAInit from "@ducanh2912/next-pwa";
const withPWA = withPWAInit({
dest: "public",
cacheOnFrontEndNav: true,
aggressiveFrontEndNavCaching: true,
reloadOnOnline: true,
swcMinify: true,
disable: process.env.NODE_ENV === "development",
fallbacks: {
//image: "/static/images/fallback.png",
document: "/offline", // if you want to fallback to a custom page rather than /_offline
// font: '/static/font/fallback.woff2',
// audio: ...,
// video: ...,
},
workboxOptions: {
disableDevLogs: true,
},
// ... other options you like
});
/** @type {import('next').NextConfig} */
const nextConfig = {
swcMinify: true,
images: {
remotePatterns: [
{
protocol: 'http',
hostname: 'localhost',
port: '5000',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'ui-avatars.com',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'd3q2sm3wlna4xq.cloudfront.net',
pathname: '/**',
},
],
},
};
export default withPWA(nextConfig);