From 19f17b497a5f6a7619af9d099243af337e8fce5e Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Mon, 4 Mar 2024 16:52:39 +0000 Subject: feature: Initial attempt at making the app a PWA --- packages/web/next.config.mjs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'packages/web/next.config.mjs') diff --git a/packages/web/next.config.mjs b/packages/web/next.config.mjs index 3ebca31a..0aa37287 100644 --- a/packages/web/next.config.mjs +++ b/packages/web/next.config.mjs @@ -1,5 +1,12 @@ +import pwa from "next-pwa"; + +const withPWA = pwa({ + dest: "public", + disable: process.env.NODE_ENV != "production", +}); + /** @type {import('next').NextConfig} */ -const nextConfig = { +const nextConfig = withPWA({ output: "standalone", async headers() { return [ @@ -27,6 +34,6 @@ const nextConfig = { }, ]; }, -}; +}); export default nextConfig; -- cgit v1.2.3-70-g09d2