Open krtkeyan opened 1 year ago
Upgraded to the latest version of 5.6.0 and ended up with Next.js Rewrites throwing 404 error
next-pwa
next
Using following config,
withPWA({ pwa: { dest: 'public', disable: process.env.NODE_ENV === 'development', publicExcludes: ['!assets/digest-email/*'] }, async rewrites() { return [ { source: "/mp/lib.min.js", destination: "https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js", }, { source: "/mp/lib.js", destination: "https://cdn.mxpnl.com/libs/mixpanel-2-latest.js", }, { source: "/mp/decide", destination: "https://decide.mixpanel.com/decide", }, { source: "/mp/:slug", destination: "https://api.mixpanel.com/:slug", }, ]; }, })
Upgrade next js to version 12.2.5 then try to write your config in the way mentioned HERE
Summary
Upgraded to the latest version of 5.6.0 and ended up with Next.js Rewrites throwing 404 error
Versions
next-pwa
: 5.6.0next
: 12.1.6Using following config,