shadowwalker / next-pwa

Zero config PWA plugin for Next.js, with workbox 🧰
MIT License
3.86k stars 323 forks source link

error - Please check your GenerateSW plugin configuration: [WebpackGenerateSW] 'pwa' property is not expected to be here. #392

Closed ydrea closed 2 years ago

ydrea commented 2 years ago

Breaks the compiling routine...

lekipising commented 2 years ago

I was facing a similar issue after upgrading to version 5.6.0. You need to write the next.config.js in a different way.

Here is a sample config

const withPWA = require("next-pwa")({
  dest: "public",
  // put other next-pwa options here
});

const nextConfig = withPWA({
  reactStrictMode: true,
  // put other next js options here
});

module.exports = nextConfig;