Skip to content

Commit

Permalink
Add PWA
Browse files Browse the repository at this point in the history
  • Loading branch information
shimizudev committed Jun 3, 2024
1 parent 0b0504b commit 54180d5
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 6 deletions.
Binary file modified bun.lockb
Binary file not shown.
23 changes: 17 additions & 6 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
import withPWAInit from '@ducanh2912/next-pwa';

const withPWA = withPWAInit({
dest: 'public',
cacheOnFrontEndNav: true,
aggressiveFrontEndNavCaching: true,
reloadOnOnline: true,
swcMinify: true,
disable: process.env.NODE_ENV === 'development',
workboxOptions: {
disableDevLogs: true,
},
});

export default withPWA({
typescript: {
ignoreBuildErros: true
ignoreBuildErros: true,
},
images: {
remotePatterns: [
Expand Down Expand Up @@ -43,6 +56,4 @@ const nextConfig = {
},
],
},
};

export default nextConfig;
});
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"lint": "next lint"
},
"dependencies": {
"@ducanh2912/next-pwa": "^10.2.7",
"@nextui-org/react": "^2.3.6",
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-dropdown-menu": "^2.0.6",
Expand Down
1 change: 1 addition & 0 deletions public/sw.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions public/swe-worker-5c72df51bb1f6ee0.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions public/workbox-f1770938.js

Large diffs are not rendered by default.

0 comments on commit 54180d5

Please sign in to comment.