From 24c444c51927886536f6701c7b7ba85890cc259c Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Tue, 16 May 2023 11:05:37 +0700 Subject: add pwa --- next.config.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'next.config.js') 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) -- cgit v1.2.3