Skip to content

fix: fix livesync when --no-hmr option is provided and changes are reverted to the initial state of application #5137

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

Merged
merged 1 commit into from
Nov 15, 2019

Conversation

Fatme
Copy link
Contributor

@Fatme Fatme commented Nov 15, 2019

Livesync doesn't work when tns run ios --no-hmr command is executed, same changes are synced and the application is reverted to its initial state. On first webpack compilation CLI stores the initial hash of the compilation but the stored hash is updated only in hmr mode. On the other side, CLI has a logic to return when the stored hash is the same as the current hash. So, when the changes are reverted to the initial state of the application, the current hash is the same as the first reported hash. This way, CLI doesn't execute any livesync logic after reporting changes from webpack process.

Rel to: #5132

PR Checklist

What is the current behavior?

What is the new behavior?

Fixes/Implements/Closes #[Issue Number].

…reverted to the initial state of application

Livesync doesn't work when `tns run ios --no-hmr` command is executed, same changes are synced and the application is reverted to its initial state. On first webpack compilation CLI stores the initial hash of the compilation but the stored hash is updated only in `hmr` mode. On the other side, CLI has a logic to return when the stored hash is the same as the current hash. So, when the changes are reverted to the initial state of the application, the current hash is the same as the first reported hash. This way, CLI doesn't execute any livesync logic after the reported changes from webpack process.

Rel to: #5132
@cla-bot cla-bot bot added the cla: yes label Nov 15, 2019
@Fatme Fatme added the no-changelog The issue is present only in `next` versions and was not included in official version. label Nov 15, 2019
@Fatme
Copy link
Contributor Author

Fatme commented Nov 15, 2019

test cli-device

@rosen-vladimirov rosen-vladimirov merged commit cc7a937 into release Nov 15, 2019
@rosen-vladimirov rosen-vladimirov deleted the fatme/fix-no-hmr-sync branch November 15, 2019 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes no-changelog The issue is present only in `next` versions and was not included in official version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants