Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,16 @@ __pycache__/
*.py[cod]
*$py.class

# PWA generated files (regenerated on each build by next-pwa)
public/sw.js
public/sw.js.map
public/workbox-*.js
public/workbox-*.js.map
public/swe-worker-*.js
public/swe-worker-*.js.map
public/fallback-*.js
public/fallback-*.js.map

# Local Storage Uploads
public/uploads/

Expand Down
7 changes: 4 additions & 3 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

const withPWA = require('@ducanh2912/next-pwa').default({
dest: 'public',
cacheOnFrontEndNav: true,
aggressiveFrontEndNavCaching: true,
cacheOnFrontEndNav: false,
aggressiveFrontEndNavCaching: false,
reloadOnOnline: true,
swcMinify: true,
disable: process.env.NODE_ENV === 'development',
Expand All @@ -15,6 +15,7 @@ const withPWA = require('@ducanh2912/next-pwa').default({
disableDevLogs: true,
skipWaiting: true,
clientsClaim: true,
cleanupOutdatedCaches: true,
runtimeCaching: [
{
urlPattern: /^https:\/\/fonts\.(googleapis|gstatic)\.com\/.*/i,
Expand Down Expand Up @@ -51,7 +52,7 @@ const withPWA = require('@ducanh2912/next-pwa').default({
},
{
urlPattern: /\/_next\/static.+\.js$/i,
handler: 'CacheFirst',
handler: 'StaleWhileRevalidate',
options: {
cacheName: 'next-static-js',
expiration: {
Expand Down
Loading