next-pwa: Uncaught (in promise) bad-precaching-response: bad-precaching-response middleware-manifest.json

Similar to https://github.com/shadowwalker/next-pwa/issues/177 but in next 12 It tries to load _next/server/middleware-manifest.json on client.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (1 by maintainers)

Commits related to this issue

Most upvoted comments

Should be working now with latest version and no buildExcludes config needed.

None of these fixes worked for me. I’m exporting statically. It would be really nice to be able to use this library.

@L1lith try this

// next.config.js
const withPWA = require("next-pwa");
const runtimeCaching = require("next-pwa/cache");

module.exports = withPWA({
  pwa: {
    runtimeCaching,
    buildExcludes: [/middleware-manifest\.json$/]
  },
});

This worked for me. Ask me for any help.

same