Skip to content

Commit

Permalink
feat: pwa setting (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
SeungJL authored May 11, 2024
2 parents 7df1b70 + a516c1b commit d1f7acf
Show file tree
Hide file tree
Showing 6 changed files with 1,129 additions and 348 deletions.
14 changes: 13 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/** @type {import('next').NextConfig} */

const withPWA = require("next-pwa");
const runtimeCaching = require("next-pwa/cache");
const nextConfig = {
images: {
remotePatterns: [
Expand Down Expand Up @@ -43,6 +44,17 @@ const nextConfig = {
},
};

module.exports = withPWA({
...nextConfig,
pwa: {
dest: "public",
register: true,
skipWaiting: true,
runtimeCaching,
// disable: process.env.NODE_ENV !== "production",
},
});

// Injected content via Sentry wizard below
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { withSentryConfig } = require("@sentry/nextjs");
Expand Down
Loading

0 comments on commit d1f7acf

Please sign in to comment.