Closed utsavdotpro closed 2 years ago
Trying to convert my BlitzJS into a PWA. I have a middleware added in my config file which is getting lost (only in production, deployed on Vercel) when wrapping with withPWA(), but is working perfectly on localhost.
withPWA()
The blitz.config.ts:
blitz.config.ts
import { customIsAuthorized } from "app/core/auth-adapter" import { BlitzConfig, sessionMiddleware } from "blitz" const withPWA = require("next-pwa") const config: BlitzConfig = { middleware: [ sessionMiddleware({ cookiePrefix: "project-name", isAuthorized: customIsAuthorized, }), ], } module.exports = withPWA({ pwa: { dest: "public", }, ...config, })
Please help me with
next-pwa
next
blitzjs
Steps to reproduce the behavior:
Link to minimal reproduces setup repository if any. NA
As mentioned above
NA
next-pwa works well with Blitz 2.0 without any additional configurations.
Also, duplicate of https://github.com/shadowwalker/next-pwa/issues/80
Closing!
Summary
Trying to convert my BlitzJS into a PWA. I have a middleware added in my config file which is getting lost (only in production, deployed on Vercel) when wrapping with
withPWA()
, but is working perfectly on localhost.The
blitz.config.ts
:Please help me with
withPWA()
Versions
next-pwa
: 5.4.4next
: 11.1.01blitzjs
: 0.44.4How To Reproduce
blitz.config.ts
with the above codeSteps to reproduce the behavior:
Link to minimal reproduces setup repository if any. NA
Expected Behaviors
As mentioned above
Screenshots
NA
Additional Context
NA