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

[BUG] Auto-reload content-script needs to check context #215

Closed
louisgv opened this issue Sep 16, 2022 Discussed in #206 · 9 comments · Fixed by #255
Closed

[BUG] Auto-reload content-script needs to check context #215

louisgv opened this issue Sep 16, 2022 Discussed in #206 · 9 comments · Fixed by #255
Assignees
Labels
bug Something isn't working

Comments

@louisgv
Copy link
Contributor

louisgv commented Sep 16, 2022

Discussed in #206

Originally posted by xmsz September 14, 2022

  1. open options.html
  2. modify code
  3. reload

Expect:
reload options.html

Actully:
options.html close itself due to reload plugin

@louisgv louisgv changed the title [BUG] autoreload in content-scripts needs to check context [BUG] autoreload content-script needs to check context Sep 16, 2022
@louisgv louisgv added the bug Something isn't working label Sep 16, 2022
@louisgv louisgv pinned this issue Sep 26, 2022
@louisgv
Copy link
Contributor Author

louisgv commented Sep 30, 2022

Wow this is much more annoying than I thought - if you have a content script, the reload screw up everything!

@louisgv louisgv changed the title [BUG] autoreload content-script needs to check context [BUG] Auto-reload content-script needs to check context Sep 30, 2022
@louisgv louisgv self-assigned this Sep 30, 2022
@chenka
Copy link

chenka commented Oct 3, 2022

I found this issue too but on chrome://<extension-id>/path-to-file.html
When I save HTML the tab was closed, and I have to reopen it every time.
This behavior cause randomly, with no error on the terminal and sometime it just disappeared, I can update code and tab wasn't closed

@louisgv
Copy link
Contributor Author

louisgv commented Oct 3, 2022

@chenka yup it's super annoying. I will prioritize fixing it this week, otherwise, it sucks to work on my own extension xD...

@louisgv
Copy link
Contributor Author

louisgv commented Oct 3, 2022

Also with this fix, we will adding back react-refresh runtime as well which will provide HMR for static pages

@louisgv
Copy link
Contributor Author

louisgv commented Oct 4, 2022

@louisgv louisgv linked a pull request Oct 5, 2022 that will close this issue
6 tasks
@louisgv
Copy link
Contributor Author

louisgv commented Oct 6, 2022

Hmm... the background sw is propagating thorough every pages, causing the socket hmr to double trigger... will need to figure out a way to determine if bgsw is running under the context of entry pages.

@louisgv
Copy link
Contributor Author

louisgv commented Oct 6, 2022

We might need to disable bgsw socket, and only reserves the HMR reload to the pages and scripts.

@louisgv louisgv mentioned this issue Oct 7, 2022
6 tasks
@louisgv
Copy link
Contributor Author

louisgv commented Oct 8, 2022

@louisgv
Copy link
Contributor Author

louisgv commented Oct 8, 2022

@louisgv louisgv unpinned this issue Oct 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants