added PWA

This commit is contained in:
Rahul 2024-03-13 20:16:29 +01:00
parent 07e52d26ce
commit 2fa3ec2f95
21 changed files with 2682 additions and 42365 deletions

View file

@ -1,14 +1,28 @@
// next.config.js
module.exports = {
// ... rest of the configuration.
// // next.config.js
// module.exports = {
// // ... rest of the configuration.
// output: "standalone",
// async redirects() {
// return [
// {
// source: "/",
// destination: "/home",
// permanent: true,
// },
// ]
// },
// }
const withPWA = require("next-pwa")({
dest: "public",
swSrc: "public/service-worker.js",
disable: process.env.NODE_ENV === "development",
register: true,
skipWaiting: true,
})
module.exports = withPWA({
reactStrictMode: true,
// next.js config
output: "standalone",
async redirects() {
return [
{
source: "/",
destination: "/home",
permanent: true,
},
]
},
}
})