Skip to content

Commit

Permalink
made pwa changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen-Gordon committed Feb 12, 2024
1 parent 21d90b9 commit 88ca5c2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
1 change: 0 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const withPWA = require('next-pwa')({
dest: 'public', // Destination directory for the PWA files
register: true, // Register the PWA service worker
skipWaiting: true, // Skip waiting for service worker activation
display: 'standalone',
});

// Export the combined configuration for Next.js with PWA support
Expand Down
17 changes: 17 additions & 0 deletions src/app/_document.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Html, Head, Main, NextScript } from 'next/document';

export default function Document() {
return (
<Html lang='en'>
<Head>
<link rel='manifest' href='/manifest.json' />
<link rel='apple-touch-icon' href='/icon.png'></link>
<meta name='theme-color' content='#2b2b2b' />
</Head>
<body>
<Main />
<NextScript />
</body>
</Html>
);
}
2 changes: 1 addition & 1 deletion src/constant/env.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const isProd = process.env.NODE_ENV === 'production';
export const isLocal = process.env.NODE_ENV === 'development';
export const isLocal = process.env.NODE_ENV === 'production';

export const showLogger = isLocal
? true
Expand Down

0 comments on commit 88ca5c2

Please sign in to comment.