diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-11-21 10:11:34 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-11-21 10:11:34 +0700 |
| commit | a5f17d7e7a1e7132a87d7fc0faf59815059fa251 (patch) | |
| tree | 2ef44f248fe200ca82c2898205ea3d94a4a0e747 /next.config.js | |
| parent | 9576f8250283fe43dd30d527b91f787afb64986c (diff) | |
Add PWA
Diffstat (limited to 'next.config.js')
| -rw-r--r-- | next.config.js | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/next.config.js b/next.config.js index 767719f..cb8597e 100644 --- a/next.config.js +++ b/next.config.js @@ -1,4 +1,14 @@ /** @type {import('next').NextConfig} */ -const nextConfig = {} +const withPWA = require("@ducanh2912/next-pwa").default({ + dest: "public", + cacheOnFrontEndNav: true, + aggressiveFrontEndNavCaching: true, + reloadOnOnline: true, + swcMinify: true, + disable: process.env.NODE_ENV === "development", + workboxOptions: { disableDevLogs: true }, +}); -module.exports = nextConfig +const nextConfig = {}; + +module.exports = withPWA(nextConfig); |
