shadowwalker / next-pwa

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

Fix client-side errors caused by cached prefetch requests #442

Open ITJesse opened 1 year ago

ITJesse commented 1 year ago

https://github.com/vercel/next.js/blob/canary/packages/next/server/next-server.ts#L1996

This code shows that when the client sends a request with an x-middleware-prefetch header, the server will return an empty JSON object with an x-middleware-skip header. If we cache these requests, will cause client error when doing client side render. We need to skip these requests when caching.

ImBIOS commented 1 year ago

@ITJesse It seems this repo is dead and the maintainer cannot be contacted for so long now. I've made an immediate response by resurrecting this repo ImBIOS/next-pwa.

ITJesse commented 1 year ago

@ImBIOS You really should keep the commit history. Although the original author has stopped maintaining it, we cannot deny the contributions he has made so far. I am disappointed to see that you did not mention any of the people here. Copying files and init a new repo isn't resurrecting the repo but is just stealing the fruit. I don't think you are on the right track.

ImBIOS commented 1 year ago

@ITJesse I'm respecting the first author by following the LICENSE rule tho. Isn't that how OSS works? Can you teach me and gave me a reference on that? If you have no problem I'm asking this, what's the benefit of keeping the commit history? It's just made my repo bigger, isn't it?

As far as I understand here and here, fork supposedly for an active repo isn't it?

Because you told me that, I rethink what I did, I think by forking it, it's come with a benefit that when the maintainer is active again, I just could tell him to merge my repo, isn't it? So, the first author can continue on it and if I am lucky, I can get invited to help the maintainer team officially help them. Again, I'm not stealing tho, according to the LICENSE, I just want this repo resurrected again.

ITJesse commented 1 year ago

Open source software (OSS) does permit the use, modification, and distribution of code according to the license terms, but it is crucial to adhere to certain conventions in order to demonstrate respect for the original author. Ignoring these conventions is not only inconsiderate but could potentially damage the spirit of collaboration that is vital to the open-source community.

Preserving the original repository's commit history is essential, as it enables others to comprehend the project's evolution, including code alterations, bug fixes, and new features. This directly impacts the maintainability of the project and makes it significantly easier for other contributors to follow its progress.

It is strongly advised to provide proper attribution in the new repository and retain the original repository's commit history. Failure to do so demonstrates a lack of understanding and appreciation for the collaborative nature of the open-source community. By adhering to these recommendations, you will foster a supportive and cooperative environment that is essential for the ongoing success of open source projects.