From a5f17d7e7a1e7132a87d7fc0faf59815059fa251 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Tue, 21 Nov 2023 10:11:34 +0700 Subject: Add PWA --- next.config.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'next.config.js') 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); -- cgit v1.2.3