diff --git a/.gitignore b/.gitignore index c5a346f..36c3449 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,14 @@ yarn-error.log* # typescript *.tsbuildinfo next-env.d.ts + +# PWA files + +**/public/sw.js +**/public/workbox-*.js +**/public/worker-*.js +**/public/sw.js.map +**/public/workbox-*.js.map +**/public/worker-*.js.map +**/public/fallback-*.js.map +**/public/fallback-*.js \ No newline at end of file diff --git a/next.config.js b/next.config.js index 6eb0870..4649a75 100644 --- a/next.config.js +++ b/next.config.js @@ -1,18 +1,12 @@ -const withPWA = require("next-pwa"); +const withPWA = require("next-pwa")({ + dest: "public", + register: true, + disable: process.env.NODE_ENV !== "production", + skipWaiting: true, +}); -/** @type {import('next').NextConfig} */ -const nextConfig = { +module.exports = withPWA({ + // nextConfig reactStrictMode: true, output: "standalone", -}; - -module.exports = withPWA({ - pwa: { - dest: "public", - register: true, - disable: process.env.NODE_ENV !== "production", - skipWaiting: true, - }, }); - -module.exports = nextConfig; diff --git a/package.json b/package.json index 887a423..fa76aa0 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,8 @@ "firebase": "^9.16.0", "html-to-image": "^1.11.4", "next": "13.1.5", - "next-pwa": "5.5.4", + "next-compose-plugins": "^2.2.1", + "next-pwa": "^5.6.0", "react": "18.2.0", "react-dom": "18.2.0", "typescript": "4.9.4" diff --git a/yarn.lock b/yarn.lock index 5842abd..feccdcd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5642,17 +5642,22 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== -next-pwa@5.5.4: - version "5.5.4" - resolved "https://registry.yarnpkg.com/next-pwa/-/next-pwa-5.5.4.tgz#5a96bb4762c649ed875e5d98a1183132c0199f49" - integrity sha512-EgB2MQWGR8oZDzY6US+/D0LOCUhPZYCgeqRVBYDxQWNi0N6XfQOoZPw2COIrg/eMt/rB0M+/mquhAQACs5v4Ag== +next-compose-plugins@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/next-compose-plugins/-/next-compose-plugins-2.2.1.tgz#020fc53f275a7e719d62521bef4300fbb6fde5ab" + integrity sha512-OjJ+fV15FXO2uQXQagLD4C0abYErBjyjE0I0FHpOEIB8upw0hg1ldFP6cqHTJBH1cZqy96OeR3u1dJ+Ez2D4Bg== + +next-pwa@^5.6.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/next-pwa/-/next-pwa-5.6.0.tgz#f7b1960c4fdd7be4253eb9b41b612ac773392bf4" + integrity sha512-XV8g8C6B7UmViXU8askMEYhWwQ4qc/XqJGnexbLV68hzKaGHZDMtHsm2TNxFcbR7+ypVuth/wwpiIlMwpRJJ5A== dependencies: babel-loader "^8.2.5" clean-webpack-plugin "^4.0.0" globby "^11.0.4" terser-webpack-plugin "^5.3.3" - workbox-webpack-plugin "^6.5.3" - workbox-window "^6.5.3" + workbox-webpack-plugin "^6.5.4" + workbox-window "^6.5.4" next-router-mock@^0.9.1: version "0.9.1" @@ -7298,7 +7303,7 @@ workbox-sw@6.5.4: resolved "https://registry.yarnpkg.com/workbox-sw/-/workbox-sw-6.5.4.tgz#d93e9c67924dd153a61367a4656ff4d2ae2ed736" integrity sha512-vo2RQo7DILVRoH5LjGqw3nphavEjK4Qk+FenXeUsknKn14eCNedHOXWbmnvP4ipKhlE35pvJ4yl4YYf6YsJArA== -workbox-webpack-plugin@^6.5.3: +workbox-webpack-plugin@^6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/workbox-webpack-plugin/-/workbox-webpack-plugin-6.5.4.tgz#baf2d3f4b8f435f3469887cf4fba2b7fac3d0fd7" integrity sha512-LmWm/zoaahe0EGmMTrSLUi+BjyR3cdGEfU3fS6PN1zKFYbqAKuQ+Oy/27e4VSXsyIwAw8+QDfk1XHNGtZu9nQg== @@ -7309,7 +7314,7 @@ workbox-webpack-plugin@^6.5.3: webpack-sources "^1.4.3" workbox-build "6.5.4" -workbox-window@6.5.4, workbox-window@^6.5.3: +workbox-window@6.5.4, workbox-window@^6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/workbox-window/-/workbox-window-6.5.4.tgz#d991bc0a94dff3c2dbb6b84558cff155ca878e91" integrity sha512-HnLZJDwYBE+hpG25AQBO8RUWBJRaCsI9ksQJEp3aCOFCaG5kqaToAYXFRAHxzRluM2cQbGzdQF5rjKPWPA1fug==