const withOffline = require("next-offline");

const nextConfig = {
  target: "serverless",
  future: {
    webpack5: true,
  },
  workboxOpts: {
    swDest: "static/service-worker.js",
    runtimeCaching: [
      {
        urlPattern: /^https?.*/,
        handler: "NetworkFirst",
        options: {
          cacheName: "https-calls",
          networkTimeoutSeconds: 15,
          expiration: {
            maxEntries: 150,
            maxAgeSeconds: 30 * 24 * 60 * 60
          },
          cacheableResponse: {
            statuses: [0, 200]
          }
        }
      }
    ]
  }
};

module.exports = withOffline(nextConfig);

@@ -90,99 +90,22 @@
 ,%0A  
-future: %7B%0A    webpack5: true,%0A  %7D,%0A  workboxOpts: %7B%0A    swDest: %22static/service-worker.js%22,
+workboxOpts: %7B
 %0A   
@@ -242,57 +242,21 @@
 e: %22
-https-calls%22,%0A          networkTimeoutSeconds: 15
+offlineCache%22
 ,%0A  
@@ -304,133 +304,12 @@
 ies:
- 150,%0A            maxAgeSeconds: 30 * 24 * 60 * 60%0A          %7D,%0A          cacheableResponse: %7B%0A            statuses: %5B0,
  200
-%5D
 %0A   

Swap back to webpack 4, adjust next-offline