Closed david-buck closed 2 years ago
Using this as a workaround for now:
module.exports = prod ? withPWA(nextConfig) : nextConfig;
I think it works fine with v5.5.4. I'm sorry, but I haven't investigated the cause yet. I think maybe the flag handling is reversed.
seems related to this line: https://github.com/shadowwalker/next-pwa/blob/9d28c3be6aa6cc082a2ca87ba61117fff57ded8f/index.js#L338
.pwa
config is deleted too early so that webpack
function can't read any user config.
https://github.com/shadowwalker/next-pwa/blob/9d28c3be6aa6cc082a2ca87ba61117fff57ded8f/index.js#L56
the value of pwa
variable is {}
Using this as a workaround for now:
module.exports = prod ? withPWA(nextConfig) : nextConfig;
it worked for me as well, thanks! @phil-madpaws
Summary
My
next.config.mjs
file hasnext-pwa
configured like so:The
disable
option seems to be ignored, even if set todisable: true
which leads to all the quirks that come with running next-pwa in development mode.Versions
next-pwa
: 5.5.5next
: 12.2.3How To Reproduce
Steps to reproduce the behavior:
disable: true
option tonext.config.js