aboutsummaryrefslogtreecommitdiffstats
path: root/packages/web/next.config.mjs
diff options
context:
space:
mode:
authorMohamedBassem <me@mbassem.com>2024-03-04 16:52:39 +0000
committerMohamedBassem <me@mbassem.com>2024-03-04 16:52:39 +0000
commit19f17b497a5f6a7619af9d099243af337e8fce5e (patch)
treeabfc437a8f1ec4a861a3784e5d4167cc213d79b4 /packages/web/next.config.mjs
parentaf01de885fdf62b2364e3cec44b25007000c3d05 (diff)
downloadkarakeep-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.mjs11
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;