Skip to content

Commit

Permalink
use Image for assets, add pwa
Browse files Browse the repository at this point in the history
  • Loading branch information
yamader committed Jul 7, 2023
1 parent d3cd9f0 commit 184f9df
Show file tree
Hide file tree
Showing 16 changed files with 2,687 additions and 35 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,11 @@ node_modules

/.next
/next-env.d.ts

# next-pwa

/public/workbox**
/public/sw**
/public/worker**
/public/fallback**
/public/precache**
18 changes: 14 additions & 4 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
const nextConfig = {
output: "export",
}
import withPWAInit from "@ducanh2912/next-pwa"

const withPWA = withPWAInit({
dest: "public",
fallbacks: {
document: "/~offline",
},
})

export default nextConfig
export default withPWA({
output: "export",
images: {
unoptimized: true,
},
})
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"uuid": "9.0.0"
},
"devDependencies": {
"@ducanh2912/next-pwa": "9.1.4",
"@types/node": "20.4.0",
"@types/react": "18.2.14",
"@types/react-dom": "18.2.6",
Expand All @@ -33,6 +34,7 @@
"prettier": "2.8.8",
"prettier-plugin-tailwindcss": "0.3.0",
"react-hook-form": "7.45.1",
"sharp": "0.32.1",
"tailwindcss": "3.3.2",
"tailwindcss-radix": "2.8.0",
"typescript": "5.1.6"
Expand All @@ -46,7 +48,7 @@
"build": "next build --no-lint",
"dev": "next dev --turbo",
"fmt": "prettier -w src",
"lint": "tsc && next lint"
"lint": "next lint"
},
"type": "module"
}
Loading

0 comments on commit 184f9df

Please sign in to comment.