Next-pwa: Does not work correctly with webpack 5

Created on 2 Nov 2020  路  5Comments  路  Source: shadowwalker/next-pwa

Summary

I cound not build correct pwa with next.js 9.5 new feature, webpack 5 support(beta).
Because this is beta feature, it might be fixed automatically by next.js.
Just for reporting.

How To Reproduce

Steps to reproduce the behavior:

  1. Clone https://github.com/vercel/next.js/tree/canary/examples/progressive-web-app
  2. Add webpack 5 resolutions to packege.json like below
    (ref. https://nextjs.org/blog/next-9-5#webpack-5-support-beta)

package.json { "resolutions": { "webpack": "^5.3.2" } }

  1. yarn install && yarn build && yarn start
  2. See error

Additional Context

I am not sure but sw.js seems to try to access the URL like below but cannot.
/autostatic/*

--

bug

Most helpful comment

Same issue, it tries to fetch:

image

from /autostatic/*

All 5 comments

I'm having the same issue, it keeps prefixing it with /autostatic/. This was not happening couple weeks ago.

Same issue, it tries to fetch:

image

from /autostatic/*

Try yarn add next-pwa@beta, see if that works for you.

yarn add next-pwa@beta works for me 馃挴

Works for me too

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LucasMallmann picture LucasMallmann  路  4Comments

adammesa picture adammesa  路  8Comments

mohammadgarmroodi picture mohammadgarmroodi  路  5Comments

jonahsnider picture jonahsnider  路  4Comments

harshzalavadiya picture harshzalavadiya  路  3Comments