feat: integrate PWA support using next-pwa; update configuration in next.config.ts, add service worker files to .gitignore, and include manifest in layout.tsx
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
import type { NextConfig } from 'next'
|
||||
const withPWA = require("@ducanh2912/next-pwa").default({
|
||||
dest: "public",
|
||||
register: true,
|
||||
skipWaiting: true,
|
||||
disable: process.env.NODE_ENV === "development",
|
||||
});
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
reactStrictMode: true,
|
||||
@@ -17,4 +23,4 @@ const nextConfig: NextConfig = {
|
||||
},
|
||||
}
|
||||
|
||||
export default nextConfig
|
||||
export default withPWA(nextConfig)
|
||||
|
||||
Reference in New Issue
Block a user