shadowwalker / next-pwa

Zero config PWA plugin for Next.js, with workbox 🧰
MIT License
3.89k stars 325 forks source link

Update instructions to use `public` folder #229

Closed karlhorky closed 3 years ago

karlhorky commented 3 years ago

Hello! First of all, thanks for this integration, really cool!

Since a few versions, Next.js has used the public folder - probably not necessary to keep the docs for the static folder in the readme anymore.

shadowwalker commented 3 years ago

Thanks for the pull request, this is totally worth thinking. However, I have a second opnion on public folder, I would recommend create a public/static/ folder to put all the static assets files under it so that it has less potential to conflict with page or API routes. Any thoughts?

karlhorky commented 3 years ago

Hm, that may be useful in some projects, but I think it doesn't belong in the simple example in the docs:

  1. the simple example should be the simplest it can be
  2. can be confusing because of the naming of the public directory was formerly static in Next.js
masone commented 3 years ago

I'm with @karlhorky here - also got confused and find his suggestion the most straight forward and the one I would expect