diff options
| author | MohamedBassem <me@mbassem.com> | 2024-03-04 16:52:39 +0000 |
|---|---|---|
| committer | MohamedBassem <me@mbassem.com> | 2024-03-04 16:52:39 +0000 |
| commit | 19f17b497a5f6a7619af9d099243af337e8fce5e (patch) | |
| tree | abfc437a8f1ec4a861a3784e5d4167cc213d79b4 /packages/web/next.config.mjs | |
| parent | af01de885fdf62b2364e3cec44b25007000c3d05 (diff) | |
| download | karakeep-19f17b497a5f6a7619af9d099243af337e8fce5e.tar.zst | |
feature: Initial attempt at making the app a PWA
Diffstat (limited to 'packages/web/next.config.mjs')
| -rw-r--r-- | packages/web/next.config.mjs | 11 |
1 files changed, 9 insertions, 2 deletions
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; |
