diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-05-16 11:05:37 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-05-16 11:05:37 +0700 |
| commit | 24c444c51927886536f6701c7b7ba85890cc259c (patch) | |
| tree | 3bf0135814a4fa995d730ed01b6b22420e7f0ff0 /next.config.js | |
| parent | d0fa61c83fb50d504600ac8701ad3dc4c2de0f11 (diff) | |
add pwa
Diffstat (limited to 'next.config.js')
| -rw-r--r-- | next.config.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/next.config.js b/next.config.js index d02aa9f0..2f3f4396 100644 --- a/next.config.js +++ b/next.config.js @@ -1,4 +1,11 @@ /** @type {import('next').NextConfig} */ +const withPWA = require('next-pwa')({ + dest: 'public', + register: true, + disable: process.env.NODE_ENV === 'development', + skipWaiting: true +}) + const nextConfig = { reactStrictMode: true, swcMinify: true, @@ -25,4 +32,4 @@ const nextConfig = { } } -module.exports = nextConfig +module.exports = withPWA(nextConfig) |
