-
Notifications
You must be signed in to change notification settings - Fork 11
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
Prevent reloading dependants #9
Comments
I'd be happy to work on a PR in the idea is accepted. |
Sorry that I haven't responded promptly. Been working to meet a few deadlines. Will check this and your other PR out tomorrow. 👍 Glad to see you taking such an interest in the project :) |
For a quick initial look, I can't think of a reason not to implement this. With regards to config. Will think about this properly tomorrow. |
I would like this as well, for |
An easy solution would be to make
Where |
@mosho1 The only issue with that would be that the lib has to traverse the tree to determine children it needs to delete. But something like that would be nice and general... I wonder if it's worth being this general. Can you think of a reason we might want to stop somewhere other then just the node or its roots? |
You can have all kinds of custom reloading scenarios, I don't see a reason to limit it to just the module itself or the roots. Off the top of my head, say you have multiple data stores that aggregate to one big store (like redux stores) where you want the whole store to reload on change to any of its child nodes, but you might not want the whole app to render again. So any reloads to the child nodes should reach the aggregate store which has the actual reloading logic and then stop. |
I didn't find a mechanism to prevent reloading dependant modules all the way up to the root. It's usually a good idea if the code wasn't specifically designed for hot reloading, but I've got at least two cases where the reload shouldn't propagate further:
Is there a way to prevent the propagation? If not, I'd suggest two possible mechanisms for consideration:
@hot
to configure reload behaviour.System.config
, allowing to toggle hot reload and its propagation through SystemJS configuration mechanisms per-package, per-extension, per-file etc.Basically we could control for each source file:
The text was updated successfully, but these errors were encountered: