-
-
Notifications
You must be signed in to change notification settings - Fork 245
Feat: FastSync - partially workaround for current HMR issues #922
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
Closed
minhnhut
wants to merge
779
commits into
nativescript-vue:main
from
tmnsolutions:fix/minhnhut-fastsync
Closed
Feat: FastSync - partially workaround for current HMR issues #922
minhnhut
wants to merge
779
commits into
nativescript-vue:main
from
tmnsolutions:fix/minhnhut-fastsync
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…vue#413) * add registerElement to NativeScriptVueConstructor Fix: `property 'registerElement' does not exist on type 'NativeScriptVueConstructor'.` Currently, the function type is defined but was not included in the constructor. * updated in contrast to nativescript-vue#409 updated to the latest master changes
…ipt-vue#444) * fix (hmr): Fix navigation trigger on iOS when HMR reloads app if <script> is changed. See nativescript-vue#388 * fix (hmr): Better way to know if the HMR is reloaded. See nativescript-vue#388 * fix (hmr): Fix the Android version for the HMR issue. See nativescript-vue#388 * chore (hmr): Remove comment. * chore (hmr): Move comment.
In case `--bundle` is not passed, the `before-checkForChanges` hook should stop the execution. However, in case `--bundle` is passed, it should allow the process to continue. Currently, even when `--bundle` is passed, the hook breaks the execution with error that you need to pass `--bundle`. The problem is that the hook checks the flag based on CLI's internal representation of the flag, but the internal structure has been changed since the PR that added this functionality has been added. Fix the hook to have correct check for bundle flag.
…oes not work with {N}-5.2 but works with {N}-5.3 This reverts commit 595d2a0.
…nativescript-vue#811) fixes nativescript-vue#809 * chore: remove unnecessary check from appendChild * fix: remove node before appending if already a child * fix: set nextSibling of prevSibling upon insertion (fixed) * test: add test case for nativescript-vue#809
…escript-vue#773) Bumps [node-notifier](https://github.com/mikaelbr/node-notifier) from 8.0.0 to 8.0.1. **This update includes a security fix.** - [Release notes](https://github.com/mikaelbr/node-notifier/releases) - [Changelog](https://github.com/mikaelbr/node-notifier/blob/v8.0.1/CHANGELOG.md) - [Commits](mikaelbr/node-notifier@v8.0.0...v8.0.1) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8. - [Release notes](https://github.com/isaacs/ini/releases) - [Commits](npm/ini@v1.3.5...v1.3.8) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ue#770) Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8. - [Release notes](https://github.com/isaacs/ini/releases) - [Commits](npm/ini@v1.3.5...v1.3.8) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ript-vue#783) Bumps [socket.io](https://github.com/socketio/socket.io) from 2.3.0 to 2.4.1. - [Release notes](https://github.com/socketio/socket.io/releases) - [Changelog](https://github.com/socketio/socket.io/blob/2.4.1/CHANGELOG.md) - [Commits](socketio/socket.io@2.3.0...2.4.1) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
This PR is my attempt to workaround for HMR issues on current NS-Vue projects.
Took advantages of replacePage in PR NativeScript/NativeScript#9460 (Thanks to @rigor789).
I am using this workaround in some production projects. It is not perfect, but far better than manually navigate away from current Page then re-open Page everytime when I made some changes. Quick feedback for developers, dramatically increase team's productivity.
Demo: https://1drv.ms/v/s!AhQCuPihXuRXgYUX5ND8b_ozUJxjCA?e=jyXjjv
How to use:
Vue.config.fastSync = true
(default is false)What works:
<template>
and<script>
What doesn't work
$start()
will not be fast synced. Only work on pages that user navigated to after that. => Recommend: Add a dummy Page when app start, then navigate away from itFixes: