Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single warning per webpack --watch #3246

Open
wants to merge 1 commit into
base: v7
Choose a base branch
from

Conversation

jon-ressio
Copy link

@jon-ressio jon-ressio commented Sep 14, 2023

  • Only warn one time per execution of webpack --watch

Improves #1790, #3180

I'd like to only see this warning printed one time per execution of next dev. Right now I see it every time a different bundle/batch of server components is compiled or when any code is recompiled and a page reloaded, it's very noisy.

I just built and tested this PR locally and I see the GenerateSW warning 4 times (I think next dev manages multiple webpack --watch processes behind the scenes for the different server and client packages, etc...) but after that initial warning it was quiet.

If maintainers don't want to accept this PR as default behavior, I can also change this PR to check for an environment variable like __WB_ONLY_WARN_ONCE or something like that. Just let me know

- Only warn one time per execution of `webpack --watch`
@jon-ressio
Copy link
Author

Just a note that this was an issue with the original next-pwa package which seems to be unmaintained for a while. https://github.com/DuCanhGH/next-pwa doesn't cause the same log spam.

So I no longer need this PR merged but I'll leave it in case others think it makes sense. Feel free to accept or reject

Copy link

@jessemoe jessemoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants