-
Notifications
You must be signed in to change notification settings - Fork 343
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
Add parameter "--watch-file" to allow reloading after build is done #1626
Comments
@Rob--W will mentor this. |
@Rob--W would you mind to add a comment with some pointers and details about what should be implemented? Thanks! |
Currently, the watching feature (of The directory ends up being used here: Line 46 in 358a63a
Previously, I described how to read the commandline argument, and forward it all the way down. While the final details are different, the start should still be accurate. |
Please I want to contribute to this , so can you explain me the issue and how to implement this |
@Shivansh2407 See the first comment at the top of this issue, the explanation at #1626 (comment) and the link to the other comment from that comment. |
@Rob--W I would love to take a stab at this if it's up for grabs. If I understand the problem correctly, bundlers like Webpack will produce code that won't be completely hot swapped into If this understanding is good enough, I can try to whip up a PR and maybe ask you some questions along the way. It seems like this solution would also indirectly solve these issues as well? |
Actually I would like to note something here. However ever since I moved to Webpack, I have no longer this problem. The Webpack is swapping build sources only when the whole build is done and it's seems to be fast enough to not cause this issue anymore. |
@jezhou Up for grabs. Your understanding is about correct; this feature request addresses the general problem of reloading too eagerly. |
Is this a feature request or a bug?
Feature
What is the current behavior?
web-ext
will try to reload add-on too soon. If you are using some builder, this will often result in partially loaded add-on as your sources are only being build.See the related bug that tries to solve the save problem with a delay parameter: #1573
What is the expected or desired behavior?
As @Rob--W suggested: #1573 (comment) one solution would be to watch only single file, that would be modified last when build is done, for example some "build.version".
Even though it requires changes in your bundler, it's still easy to do and it's reactive - so it will save time and your CPU as
web-ext
will not try to reload not fully build add-on.The text was updated successfully, but these errors were encountered: