Skip to content

Commit

Permalink
PWA実装
Browse files Browse the repository at this point in the history
  • Loading branch information
MurakawaTakuya committed Jan 9, 2025
1 parent dd3707e commit 2db4ddc
Show file tree
Hide file tree
Showing 13 changed files with 5,793 additions and 1,977 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,7 @@ ui-debug.log
*.cache
*.log
functions\lib

# PWA
public/workbox-*.js
public/sw.js
3 changes: 2 additions & 1 deletion functions/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"strict": true,
"esModuleInterop": true,
"target": "es2017",
"moduleResolution": "node"
"moduleResolution": "node",
"skipLibCheck": true
},
"compileOnSave": true,
"include": ["src/*", "functions/src/**/*", "src/**/*.ts"]
Expand Down
13 changes: 10 additions & 3 deletions next.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import type { NextConfig } from "next";
import nextPWA from "next-pwa";

const nextConfig: NextConfig = {
const withPWA = nextPWA({
dest: "public",
register: true,
skipWaiting: true,
buildExcludes: [/middleware-manifest.json$/],
});

const nextConfig = withPWA({
output: "export",
trailingSlash: true,
sassOptions: {
Expand All @@ -9,6 +16,6 @@ const nextConfig: NextConfig = {
images: {
unoptimized: true,
},
};
});

export default nextConfig;
Loading

0 comments on commit 2db4ddc

Please sign in to comment.