From e5c1d59402b628c405e4579227e35d317ab67ed1 Mon Sep 17 00:00:00 2001 From: tecc Date: Fri, 14 Oct 2022 01:56:02 +0200 Subject: [PATCH] fix(next): Fixed PWA configuration stuff pwa-config: The `pwa` property has been removed from the `withPWA` call, and its contained properties have been moved to the `nextPWA` options object. This removes all warnings from Next. --- next.config.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/next.config.js b/next.config.js index 6ea2c3b..016e87b 100644 --- a/next.config.js +++ b/next.config.js @@ -4,15 +4,11 @@ const cache = require('./scripts/cache'); const withPWA = nextPWA({ // target: process.env.NETLIFY ? 'serverless' : 'server', // mode: process.env.NODE_ENV ?? 'development', + disable: process.env.NODE_ENV === 'development', dest: 'public', + runtimeCaching: cache, }); module.exports = withPWA({ - swcMinify: true, - - pwa: { - disable: process.env.NODE_ENV === 'development', - dest: 'public', - runtimeCaching: cache, - }, + swcMinify: true });