Skip to content

Commit

Permalink
✨ Make site an installable PWA
Browse files Browse the repository at this point in the history
  • Loading branch information
splinter98 committed Aug 17, 2023
1 parent 8cf4f88 commit c639bca
Show file tree
Hide file tree
Showing 4 changed files with 2,579 additions and 20 deletions.
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,15 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts

#Next-pwa
public/precache.*.*.js
public/sw.js
public/workbox-*.js
public/worker-*.js
public/fallback-*.js
public/precache.*.*.js.map
public/sw.js.map
public/workbox-*.js.map
public/worker-*.js.map
public/fallback-*.js
7 changes: 6 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
/**
* @type {import('next').NextConfig}
*/

const withPWA = require('next-pwa')({
dest: 'public'
})

const nextConfig = {
output: 'export',
// Optional: Add a trailing slash to all paths `/about` -> `/about/`
Expand All @@ -9,4 +14,4 @@ const nextConfig = {
// distDir: 'dist',
}

module.exports = nextConfig
module.exports = withPWA(nextConfig)
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"next": "^13.4.12",
"next-pwa": "^5.6.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"web-vitals": "^3.4.0"
Expand Down
Loading

0 comments on commit c639bca

Please sign in to comment.