Skip to content

Commit

Permalink
chore: enable PWA by default
Browse files Browse the repository at this point in the history
  • Loading branch information
agustinusnathaniel committed Dec 13, 2023
1 parent d1ee417 commit 904c01d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
- ✔️ **toolings** for linting, formatting, and conventions configured
- `eslint`, `prettier`, `husky`, `lint-staged`, `commitlint`, `commitizen`, and `standard-version`
- `pre-commit`, `pre-push`, `commit-msg`, `prepare-commit-msg` hook configured
- 📱 **PWA-ready** - `next-pwa` configured, disabled by default, just enable it through `next.config.js`
- 📱 **PWA-ready** - `next-pwa` configured, enabled by default, just disable it through `next.config.js`
- 🔎 SEO optimization configured - with `next-sitemap`.
- you'll need to reconfigure or tinker with it to get it right according to your needs, but it's there if you need it.
- 🎨 basic responsive layout configured - don't need it? just remove it 😃
Expand Down
14 changes: 5 additions & 9 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
const withPWA = require("next-pwa")({
dest: "public",
disable:
process.env.NODE_ENV === "development" ||
process.env.NODE_ENV === "preview" ||
process.env.NODE_ENV === "production",
// delete two lines above to enable PWA in production deployment
// add your own icons to public/manifest.json
const withPWA = require('next-pwa')({
dest: 'public',
disable: process.env.NODE_ENV === 'development',
// add your own icons to src/app/manifest.ts
// to re-generate manifest.json, you can visit https://tomitm.github.io/appmanifest/
});

Expand All @@ -14,6 +10,6 @@ module.exports = withPWA({
swcMinify: true,
reactStrictMode: true,
eslint: {
dirs: ["src"],
dirs: ['src'],
},
});

1 comment on commit 904c01d

@vercel
Copy link

@vercel vercel bot commented on 904c01d Dec 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.