diff options
| author | trisusilo48 <tri.susilo@altama.co.id> | 2024-10-25 11:15:21 +0700 |
|---|---|---|
| committer | trisusilo48 <tri.susilo@altama.co.id> | 2024-10-25 11:15:21 +0700 |
| commit | 9c13df19a6ffe0dbfa291404cdfa72c8633b7200 (patch) | |
| tree | 1f2db7ccb0fe35d445426e32958e790d568da074 | |
| parent | 053b45c6d4c7a8fa0853de9acab5f98642ed72dc (diff) | |
add pwa library
| -rw-r--r-- | next.config.mjs | 9 | ||||
| -rw-r--r-- | package.json | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/next.config.mjs b/next.config.mjs index 4678774..ab509d0 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,4 +1,11 @@ +import withPWA from 'next-pwa'; + /** @type {import('next').NextConfig} */ -const nextConfig = {}; +const nextConfig = withPWA({ + dest: 'public', + register: true, + disable: process.env.NODE_ENV === 'development', + skipWaiting: true +}); export default nextConfig; diff --git a/package.json b/package.json index 387fecb..45abfe7 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "axios": "^1.7.7", "cookies-next": "^4.3.0", "next": "14.2.15", + "next-pwa": "^5.6.0", "opencv.js": "^1.2.1", "quagga": "^0.12.1", "react": "^18", |
