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.
This commit is contained in:
tecc 2022-10-14 01:56:02 +02:00
parent 1342ec2314
commit e5c1d59402
No known key found for this signature in database
GPG Key ID: 400AAD881FCC028B

View File

@ -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
});