This commit is contained in:
2022-08-29 06:49:04 +02:00
parent 1eb256f163
commit 9f8e16c036
7 changed files with 430 additions and 1260 deletions

View File

@@ -1,8 +1,14 @@
const withPWA = require("next-pwa");
const runtimeCaching = require("next-pwa/cache");
const { PHASE_DEVELOPMENT_SERVER } = require("next/constants");
const withPWA = require("next-pwa")({
dest: "public",
register: true,
skipWaiting: true,
runtimeCaching,
})
module.exports = (phase, { defaultConfig }) => {
if (phase === PHASE_DEVELOPMENT_SERVER) {
return {
@@ -12,11 +18,6 @@ module.exports = (phase, { defaultConfig }) => {
return withPWA({
reactStrictMode: true,
pwa: {
dest: "public",
register: true,
skipWaiting: true,
runtimeCaching,
},
output: 'standalone',
});
};