Skip to content

Commit

Permalink
feat: PWA
Browse files Browse the repository at this point in the history
  • Loading branch information
BodaNabeel committed Mar 2, 2024
1 parent 6f27307 commit 7b60026
Show file tree
Hide file tree
Showing 11 changed files with 3,744 additions and 166 deletions.
9 changes: 9 additions & 0 deletions ui/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,12 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts


# pwa files
**/public/sw.js
**/public/workbox-*.js
**/public/worker-*.js
**/public/sw.js.map
**/public/workbox-*.js.map
**/public/worker-*.js.map
17 changes: 13 additions & 4 deletions ui/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
import withPWA from "next-pwa";

const config = {
dest: "public",
disable: process.env.NODE_ENV === "development",
register: true,
sw: "service-worker.js",
};

export default nextConfig;
const withPWAConfig = withPWA(config);

export default {
...withPWAConfig,
reactStrictMode: false,
};
Loading

0 comments on commit 7b60026

Please sign in to comment.